author | Junio C Hamano <gitster@pobox.com> | |
Fri, 10 Feb 2012 22:08:27 +0000 (14:08 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 10 Feb 2012 22:08:27 +0000 (14:08 -0800) |
* js/add-e-submodule-fix:
add -e: do not show difference in a submodule that is merely dirty
add -e: do not show difference in a submodule that is merely dirty
1 | 2 | |||
---|---|---|---|---|
builtin/add.c | patch | | diff1 | | diff2 | | blob | history |
diff --combined builtin/add.c
index 1c42900ff8c55a94ccfd1d214567d0f64d615412,68fd050e94586b15ac720e415f8026ef2f62f7d1..b79336d712b4c71cc2f026b0e9f42ea0bcebfc6f
--- 1/builtin/add.c
--- 2/builtin/add.c
+++ b/builtin/add.c
#include "diff.h"
#include "diffcore.h"
#include "revision.h"
+#include "bulk-checkin.h"
static const char * const builtin_add_usage[] = {
"git add [options] [--] <filepattern>...",
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);
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) ||