Skip to content

Commit

Permalink
Merge branch 'jc/maint-diff-q-filter' into maint
Browse files Browse the repository at this point in the history
* jc/maint-diff-q-filter:
  diff --quiet: disable optimization when --diff-filter=X is used
  • Loading branch information
Junio C Hamano committed Apr 1, 2011
2 parents bf87e09 + 2cfe8a6 commit bcf3d1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion diff-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
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))
Expand Down
7 changes: 7 additions & 0 deletions t/t4040-whitespace-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,11 @@ test_expect_success 'diff-files -b -p --exit-code' '
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

0 comments on commit bcf3d1f

Please sign in to comment.