author | Junio C Hamano <gitster@pobox.com> | |
Fri, 1 Apr 2011 23:23:34 +0000 (16:23 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 1 Apr 2011 23:23:34 +0000 (16:23 -0700) |
* jc/maint-diff-q-filter:
diff --quiet: disable optimization when --diff-filter=X is used
diff --quiet: disable optimization when --diff-filter=X is used
diff-lib.c | patch | blob | history | |
t/t4040-whitespace-status.sh | patch | blob | history |
diff --git a/diff-lib.c b/diff-lib.c
index 392ce2bef05746cea7922d39da67bf25d1d3d192..f8e33256ebe7ecd6ebf69669d9bfe50488c01fa1 100644 (file)
--- a/diff-lib.c
+++ b/diff-lib.c
unsigned dirty_submodule = 0;
if (DIFF_OPT_TST(&revs->diffopt, QUICK) &&
- DIFF_OPT_TST(&revs->diffopt, HAS_CHANGES))
+ !revs->diffopt.filter &&
+ DIFF_OPT_TST(&revs->diffopt, HAS_CHANGES))
break;
if (!ce_path_match(ce, revs->prune_data))
index a30b03bcf27ba360c3761ade77ddf0ed00600470..abc49348b196cf0fec232b6f2399356e4fe324d5 100755 (executable)
git diff-files -b -p --exit-code
'
+test_expect_success 'diff-files --diff-filter --quiet' '
+ git reset --hard &&
+ rm a/d &&
+ echo x >>b/e &&
+ test_must_fail git diff-files --diff-filter=M --quiet
+'
+
test_done