Re: [PATCH v7 3/3] replay: offer an option to linearize the commit topology
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 17, 2026, 14:57 UTC
- Message-ID
- <xmqq1pd17jgi.fsf@gitster.g>
- In-Reply-To
- <CABPp-BGdK8v8Qk5XB=QL_yJDPTNjSb2rN08GiPpK50V2gAj1QQ@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 16 quoted lines
> On Wed, Jul 15, 2026 at 11:49 AM Junio C Hamano <gitster@pobox.com> wrote: >> >> Elijah Newren <newren@gmail.com> writes: >> >> But if that is not the outcome they wanted, I fail to see why they >> would feed all three branches to a single invocation of --linearize >> in the first place. After all, the command is only doing what it >> was asked to do. > > Passing several branches isn't the user asking for concatenation; it's > the user asking for replay's core feature: update many branches at > once. Adding --linearize to flatten a merge does have to join the > lines which that merge combined, but it shouldn't also weld together > branches that were never merged in the first place. The user is > combining two intended features, and the concatenation is an emergent > third behavior that neither of them implies.
I am not yet convinced by the above.
* The fact that the user ran 'git replay' indicates that they want the command's core feature of updating multiple branches.
* The fact that the user specified '--linearize' indicates that they want a linear history, regardless of the number of positive branch tips they gave.
So from that point of view, I still think it reasonable to expect such a history to be linearized.
In any case, I am not the primary audience for this new feature, and I have no desire to dictate the design one way or the other. Let us hear what the topic author has to say.
I will mark the topic as "On hold, waiting for response".
Thanks.