Merge branch 'jk/all-negative-diff-filter-fix'
A diff-filter with negative-only specification like "git log --diff-filter=d" did not trigger correctly, which has been fixed. * jk/all-negative-diff-filter-fix: setup_revisions(): turn on diffs for all-negative diff filtermaint
commit
50d9c342b4
|
@ -3112,7 +3112,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
|
|||
|
||||
/* Pickaxe, diff-filter and rename following need diffs */
|
||||
if ((revs->diffopt.pickaxe_opts & DIFF_PICKAXE_KINDS_MASK) ||
|
||||
revs->diffopt.filter ||
|
||||
revs->diffopt.filter || revs->diffopt.filter_not ||
|
||||
revs->diffopt.flags.follow_renames)
|
||||
revs->diff = 1;
|
||||
|
||||
|
|
|
@ -134,6 +134,12 @@ test_expect_success 'diff-filter=D' '
|
|||
|
||||
'
|
||||
|
||||
test_expect_success 'all-negative filter' '
|
||||
git log --no-renames --format=%s --diff-filter=d HEAD >actual &&
|
||||
printf "%s\n" fifth fourth third second initial >expect &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success 'diff-filter=R' '
|
||||
|
||||
git log -M --pretty="format:%s" --diff-filter=R HEAD >actual &&
|
||||
|
|
Loading…
Reference in New Issue