From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Eric Salem <ericsalem@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
git@vger.kernel.org
Subject: Re: [PATCH] setup_revisions(): turn on diffs for all-negative diff filter
Date: Sun, 06 Jul 2025 22:31:57 -0700 [thread overview]
Message-ID: <xmqq7c0ka7n6.fsf@gitster.g> (raw)
In-Reply-To: <20250703224428.GB1909836@coredump.intra.peff.net> (Jeff King's message of "Thu, 3 Jul 2025 18:44:28 -0400")
Jeff King <peff@peff.net> 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.
prev parent reply other threads:[~2025-07-07 5:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 20:28 Behavior of git log --diff-filter=d Eric Salem
2025-07-03 13:42 ` Re " K Jayatheerth
2025-07-03 15:36 ` Jeff King
2025-07-03 21:30 ` Eric Salem
2025-07-03 15:34 ` Jeff King
2025-07-03 22:44 ` [PATCH] setup_revisions(): turn on diffs for all-negative diff filter Jeff King
2025-07-03 23:42 ` Eric Salem
2025-07-04 13:30 ` Karthik Nayak
2025-07-07 5:31 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq7c0ka7n6.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=ericsalem@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).