From: Junio C Hamano Date: Mon, 13 Feb 2012 19:42:18 +0000 (-0800) Subject: Merge branch 'js/add-e-submodule-fix' into maint X-Git-Tag: v1.7.9.1~6 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4daf6fc837f7cc84335958b9d9e8a29e41b4ee8e?ds=inline;hp=-c Merge branch 'js/add-e-submodule-fix' into maint * js/add-e-submodule-fix: add -e: do not show difference in a submodule that is merely dirty --- 4daf6fc837f7cc84335958b9d9e8a29e41b4ee8e diff --combined builtin/add.c index 1c42900ff8,68fd050e94..b79336d712 --- a/builtin/add.c +++ b/builtin/add.c @@@ -13,7 -13,6 +13,7 @@@ #include "diff.h" #include "diffcore.h" #include "revision.h" +#include "bulk-checkin.h" static const char * const builtin_add_usage[] = { "git add [options] [--] ...", @@@ -280,6 -279,7 +280,7 @@@ static int edit_patch(int argc, const c argc = setup_revisions(argc, argv, &rev, NULL); rev.diffopt.output_format = DIFF_FORMAT_PATCH; + DIFF_OPT_SET(&rev.diffopt, IGNORE_DIRTY_SUBMODULES); out = open(file, O_CREAT | O_WRONLY, 0644); if (out < 0) die (_("Could not open '%s' for writing."), file); @@@ -459,15 -459,11 +460,15 @@@ int cmd_add(int argc, const char **argv free(seen); } + plug_bulk_checkin(); + exit_status |= add_files_to_cache(prefix, pathspec, flags); if (add_new_files) exit_status |= add_files(&dir, flags); + unplug_bulk_checkin(); + finish: if (active_cache_changed) { if (write_cache(newfd, active_cache, active_nr) ||