From: Ben Knoble Date: Wed, 04 Nov 2026 18:00:13 GMT Subject: Re: [PATCH v3] range-diff: add --matched-only to skip one-sided commits Message-ID: <2D59CFA3-B1A6-49E3-A930-C3057D97D507@gmail.com> In-Reply-To: <62095245-8121-4698-b1aa-ff239286d9e9@app.fastmail.com> > Le 4 nov. 2026 à 06:27, Kristoffer Haugsbakk a écrit : > > On Tue, Nov 3, 2026, at 02:10, Ben Knoble wrote: >>>> Le 2 nov. 2026 à 19:16, Junio C Hamano a écrit : >>> >>> "Matt Hunter" 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 and two evolutions and are >>> given, and .. and .. 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 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 :) > > I use the > > base..old base..new > > Form as well.[1] Then it indeed does not matter if you have rebased or > not, as far as unrelated commits are concerned. You won’t get unrelated > commits. > > † 1: The repetition seems a bit inevitable and annoying, but I use a > script for assembling all of the options to git-format-patch(1). What repetition? git range-diff base old new ;)