summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 125fd98)
raw | patch | inline | side by side (parent: 125fd98)
author | Jens Lehmann <Jens.Lehmann@web.de> | |
Sat, 23 Jan 2010 16:37:26 +0000 (17:37 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 25 Jan 2010 05:03:23 +0000 (21:03 -0800) |
The diff family suppresses the output of submodule changes when
requested but checks them nonetheless. But since recently submodules
get examined for their dirtiness, which is rather expensive. There is
no need to do that when the --ignore-submodules option is used, as
the gathered information is never used anyway.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
requested but checks them nonetheless. But since recently submodules
get examined for their dirtiness, which is rather expensive. There is
no need to do that when the --ignore-submodules option is used, as
the gathered information is never used anyway.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-lib.c | patch | blob | history |
diff --git a/diff-lib.c b/diff-lib.c
index c6c425e624124c23c0f9cc8e1e0d73dc75dcbf64..899034d354e4f009a1e9aab1e49f01e856a3a30a 100644 (file)
--- a/diff-lib.c
+++ b/diff-lib.c
}
changed = ce_match_stat(ce, &st, ce_option);
if (S_ISGITLINK(ce->ce_mode)
+ && !DIFF_OPT_TST(&revs->diffopt, IGNORE_SUBMODULES)
&& (!changed || (revs->diffopt.output_format & DIFF_FORMAT_PATCH))
&& is_submodule_modified(ce->name)) {
changed = 1;
const unsigned char **sha1p,
unsigned int *modep,
int cached, int match_missing,
- unsigned *dirty_submodule, int output_format)
+ unsigned *dirty_submodule, struct diff_options *diffopt)
{
const unsigned char *sha1 = ce->sha1;
unsigned int mode = ce->ce_mode;
}
changed = ce_match_stat(ce, &st, 0);
if (S_ISGITLINK(ce->ce_mode)
- && (!changed || (output_format & DIFF_FORMAT_PATCH))
+ && !DIFF_OPT_TST(diffopt, IGNORE_SUBMODULES)
+ && (!changed || (diffopt->output_format & DIFF_FORMAT_PATCH))
&& is_submodule_modified(ce->name)) {
changed = 1;
*dirty_submodule = 1;
* the working copy.
*/
if (get_stat_data(new, &sha1, &mode, cached, match_missing,
- &dirty_submodule, revs->diffopt.output_format) < 0)
+ &dirty_submodule, &revs->diffopt) < 0)
return;
diff_index_show_file(revs, "+", new, sha1, mode, dirty_submodule);
unsigned dirty_submodule = 0;
if (get_stat_data(new, &sha1, &mode, cached, match_missing,
- &dirty_submodule, revs->diffopt.output_format) < 0) {
+ &dirty_submodule, &revs->diffopt) < 0) {
if (report_missing)
diff_index_show_file(revs, "-", old,
old->sha1, old->ce_mode, 0);