Re: [PATCH v3] range-diff: add --matched-only to skip one-sided commits
- From
Ben Knoble <ben.knoble@gmail.com>
- Date
- Nov 3, 2026, 01:10 UTC
- Message-ID
- <427F4BDB-B21B-468E-9C6A-4A7FE3F13688@gmail.com>
- In-Reply-To
- <xmqqcxsmg473.fsf@gitster.g>
Show 19 quoted lines
> Le 2 nov. 2026 à 19:16, Junio C Hamano <gitster@pobox.com> a écrit : > > "Matt Hunter" <m@lfurio.us> writes: > >> Wouldn't invoking as >> >> git range-diff origin/master >> pr-git-2401/HaraldNordgren/range-diff-matched-only-v3 >> range-diff-matched-only >> >> address this case? > > Three-rev form where <base> and two evolutions <rev1> and <rev2> are > given, and <base>..<rev1> and <base>..<rev2> are compared? > > I thought Harald's case was to take the patches from the previous > round of the topic and rebase them on top of a different base (e.g., > updated origin/master), so there is no suitable single <base> for > the three-rev form, but I may have misunderstood his example.
I think origin..old-topic and origin..new-topic would both select only the “topic” commits as long as both bases are reachable from origin (which seems to be the described case, to me).
I agree with Matt that better selection of inputs to range-diff makes this specific case better :)