Thread (1 message) 1 message, 1 author, 2025-07-07

Re: [PATCH] setup_revisions(): turn on diffs for all-negative diff filter

From: Junio C Hamano <hidden>
Date: 2025-07-07 05:31:59

Jeff King [off-list ref] writes:
Argh, I forgot to add Johannes to the cc. Fortunately since then I had a
moment to look at this, and the solution is pretty simple. So here it is
as a patch with a test.

-- >8 --
Subject: setup_revisions(): turn on diffs for all-negative diff filter

When the user gives us a diff filter like --diff-filter=D, we need to do
a tree diff even if we're not planning to show the diff result itself,
in order to decide whether to show the commit at all. So there's an
explicit check of revs->diffopt.filter in setup_revisions(), and we set
revs->diff if any bits are set.

Originally that "filter" field covered both positive capital-letter
filters (like "D") and also negative lowercase filters (like "d"), so it
was sufficient for both cases. But later, 75408ca949 (diff-filter: be
more careful when looking for negative bits, 2022-01-28) split the
negative bits out into a "filter_not" field.
Ah, ouch, so the patch somehow ended up to be less careful about
negative bits after all ;-)

Thanks for noticing the breakage and fixing it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help