Re: [PATCH v3] range-diff: add --matched-only to skip one-sided commits
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- Nov 2, 2026, 10:05 UTC
- Message-ID
- <CAHwyqnVtN79Y7SAWb4YFRCqCO6+Jq9-9tZ9Jho4ec8pjVJR00Q@mail.gmail.com>
- In-Reply-To
- <xmqqy0bblhbp.fsf@gitster.g>
On Mon, Nov 2, 2026 at 10:21 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 41 quoted lines
> > "Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > From: Harald Nordgren <haraldnordgren@gmail.com> > > > > Reviewing a range-diff often means scrolling past commits that were > > simply added or dropped, when only the ones that correspond between > > the two ranges are of interest. > > > > --left-only and --right-only already each suppress one of those > > one-sided groups, but they are defined as "only show this side" and > > so cannot be given together, which is exactly why show_range_diff() > > already rejected that combination. Give the "show only the commits > > that correspond on both sides" behavior its own name, --matched-only, > > instead of asking users to reach for a combination that errors out. > > > > Extend the existing '--left-only'/'--right-only' conflict check to > > also reject any combination with --matched-only, since all three > > narrow the output in ways that cannot be combined. > > > > Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com> > > --- > > range-diff: add --matched-only to skip one-sided commits > > > > Add git range-diff --matched-only to only show commits that correspond > > between the two ranges, skipping ones that were only added or only > > removed. > > > > Changes in v2: > > > > * Update docs and commit message. > > * Use die_for_incompatible_opt3. > > This is more than 6 weeks old and looking at the archive, nobody > (including me) was really interested in the topic. Anybody wants to > take a fresh look at the topic? > > Unless we see some volunteers to give it a review in a few weeks, I > will discard the topic out of my tree, as 'seen' has been crowded > with topics that have been collecting dust without getting many > reviews.
That's a bit sad. I wonder if no one is commenting on it because the code is too trivial, meaning nothing that stands out to comment on. All it does is allow left_only and right_only to run at the same time, and the majority of the new code is tests.
Harald