From: Junio C Hamano Date: Fri, 10 Feb 2012 22:08:27 +0000 (-0800) Subject: Merge branch 'js/add-e-submodule-fix' X-Git-Tag: v1.7.10-rc0~107 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ee8d52f83985ba897dab2829823fbcfe40083cf6;hp=-c;p=git.git Merge branch 'js/add-e-submodule-fix' * js/add-e-submodule-fix: add -e: do not show difference in a submodule that is merely dirty --- ee8d52f83985ba897dab2829823fbcfe40083cf6 diff --combined builtin/add.c index 1c42900ff,68fd050e9..b79336d71 --- 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) ||