Commits

Anonymous committed bcf3d1f Merge

Merge branch 'jc/maint-diff-q-filter' into maint

* jc/maint-diff-q-filter:
diff --quiet: disable optimization when --diff-filter=X is used

Comments (0)

Files changed (2)

 		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))

t/t4040-whitespace-status.sh

 	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