From: Junio C Hamano <gitster@pobox.com>
To: Elijah Newren <newren@gmail.com>
Cc: Toon Claes <toon@iotcl.com>,
git@vger.kernel.org,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH v7 3/3] replay: offer an option to linearize the commit topology
Date: Mon, 13 Jul 2026 15:09:22 -0700 [thread overview]
Message-ID: <xmqqbjcawnhp.fsf@gitster.g> (raw)
In-Reply-To: <CABPp-BGzU9KHGF1nipi2HZaa1AiikMKGGaapQzHVH06wO4V1ww@mail.gmail.com> (Elijah Newren's message of "Thu, 9 Jul 2026 20:47:37 -0700")
Elijah Newren <newren@gmail.com> writes:
> For what it's worth, looking back at the v5 thread, it seems the `base
> = last_commit` rule came in to fix the real bug Junio and Phillip
> pointed out there -- that without it, only one side of a linearized
> merge survived. That fix is clearly correct for the single-branch
> case. My worry is only that applying it unconditionally reintroduces
> the multiple-positive-refs ordering problem we deliberately avoid
> elsewhere. Making `--linearize` reject multiple positive refs would
> keep the merge-flattening fix while sidestepping this entirely.
>
>> A user
>> who wants to linearize ranges independently is advised to use separate
>> git-replay(1) invocations.
>
> Which, to me, is another argument for just disallowing multiple
> positive refs under `--linearize`: if the recommended way to do it is
> separate invocations anyway, we may as well require them.
Hmph. To me, this is slightly different. It acts more like an
escape hatch: "if you really do not want to mix unrelated things
into a single linear history, you can do this other thing."
Stepping back, the unpredictable order of multiple merged lines of
history exists even without multiple positive refs. If you have
independent lines of development that were merged and you linearize
them, someone must choose which line comes first. If you let the
machinery make that decision, the resulting commit order may not
reflect your preferences.
While I rarely perform octopus merges anymore, in situations where an
octopus merge is appropriate (e.g., when you have N independent
branches and their merge order does not matter), linearizing such
a history into a random sequence of N segments, built on top of
one another in an unspecified order, could actually be considered a
feature. You do not have to make a decision about something that is
inconsequential.
So, I am not convinced we should forbid this behavior to avoid
dealing with a history containing merges or multiple positive tips.
When achieving a strictly linear history is the user's goal under
the "--linearize" option, is it not inherent that there is no single
"correct" order for these independent segments of history to appear
in the final linear result?
Perhaps I am not reading you correctly, but that is how I read that
escape hatch explanation.
Thanks.
next prev parent reply other threads:[~2026-07-13 22:09 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 18:37 [PATCH 0/3] Teach git-replay(1) to linearize merge commits Toon Claes
2026-06-08 18:37 ` [PATCH 1/3] replay: refactor enum replay_mode into a bool Toon Claes
2026-06-08 18:37 ` [PATCH 2/3] replay: add helper to put entry into mapped_commits Toon Claes
2026-06-08 18:37 ` [PATCH 3/3] replay: offer an option to linearize the commit topology Toon Claes
2026-06-08 19:29 ` Junio C Hamano
2026-06-10 14:26 ` Toon Claes
2026-06-10 14:49 ` [PATCH v2 0/3] Teach git-replay(1) to linearize merge commits Toon Claes
2026-06-10 14:49 ` [PATCH v2 1/3] replay: refactor enum replay_mode into a bool Toon Claes
2026-06-11 15:09 ` Justin Tobler
2026-06-12 8:19 ` Toon Claes
2026-06-10 14:49 ` [PATCH v2 2/3] replay: add helper to put entry into mapped_commits Toon Claes
2026-06-10 14:49 ` [PATCH v2 3/3] replay: offer an option to linearize the commit topology Toon Claes
2026-06-10 17:02 ` Junio C Hamano
2026-06-16 8:38 ` Toon Claes
2026-06-14 6:56 ` Elijah Newren
2026-06-16 7:09 ` Toon Claes
2026-06-16 9:26 ` [PATCH v3 0/3] Teach git-replay(1) to linearize merge commits Toon Claes
2026-06-16 9:26 ` [PATCH v3 1/3] replay: refactor enum replay_mode into a bool Toon Claes
2026-06-16 9:26 ` [PATCH v3 2/3] replay: add helper to put entry into mapped_commits Toon Claes
2026-06-16 9:26 ` [PATCH v3 3/3] replay: offer an option to linearize the commit topology Toon Claes
2026-06-22 12:41 ` [PATCH v4 0/3] Teach git-replay(1) to linearize merge commits Toon Claes
2026-06-22 12:41 ` [PATCH v4 1/3] replay: refactor enum replay_mode into a bool Toon Claes
2026-06-22 13:53 ` Patrick Steinhardt
2026-06-22 15:43 ` Junio C Hamano
2026-06-24 19:15 ` Toon Claes
2026-06-22 12:41 ` [PATCH v4 2/3] replay: add helper to put entry into mapped_commits Toon Claes
2026-06-22 13:53 ` Patrick Steinhardt
2026-06-22 12:41 ` [PATCH v4 3/3] replay: offer an option to linearize the commit topology Toon Claes
2026-06-22 13:53 ` Patrick Steinhardt
2026-06-26 5:36 ` Toon Claes
2026-06-29 8:04 ` Patrick Steinhardt
2026-06-30 9:44 ` Johannes Schindelin
2026-06-30 11:32 ` Patrick Steinhardt
2026-06-26 5:48 ` [PATCH v5 0/3] Teach git-replay(1) to linearize merge commits Toon Claes
2026-06-26 5:48 ` [PATCH v5 1/3] replay: add helper to put entry into mapped_commits Toon Claes
2026-06-26 16:50 ` Junio C Hamano
2026-06-26 5:48 ` [PATCH v5 2/3] replay: better explain how pick_regular_commit() picks a base Toon Claes
2026-06-26 5:48 ` [PATCH v5 3/3] replay: offer an option to linearize the commit topology Toon Claes
2026-06-26 17:10 ` Junio C Hamano
2026-06-27 13:44 ` Phillip Wood
2026-07-01 8:50 ` Toon Claes
2026-06-28 12:20 ` [PATCH v5 0/3] Teach git-replay(1) to linearize merge commits Johannes Schindelin
2026-06-30 13:42 ` Toon Claes
2026-07-02 17:58 ` [PATCH v6 " Toon Claes
2026-07-02 17:58 ` [PATCH v6 1/3] replay: add helper to put entry into replayed_commits Toon Claes
2026-07-02 17:58 ` [PATCH v6 2/3] replay: resolve the replay base outside pick_regular_commit() Toon Claes
2026-07-02 17:58 ` [PATCH v6 3/3] replay: offer an option to linearize the commit topology Toon Claes
2026-07-03 20:57 ` Junio C Hamano
2026-07-07 15:09 ` Toon Claes
2026-07-07 19:35 ` Junio C Hamano
2026-07-07 19:07 ` [PATCH v7 0/3] Teach git-replay(1) to linearize merge commits Toon Claes
2026-07-07 19:07 ` [PATCH v7 1/3] replay: add helper to put entry into replayed_commits Toon Claes
2026-07-07 19:07 ` [PATCH v7 2/3] replay: resolve the replay base outside pick_regular_commit() Toon Claes
2026-07-07 19:07 ` [PATCH v7 3/3] replay: offer an option to linearize the commit topology Toon Claes
2026-07-10 3:47 ` Elijah Newren
2026-07-13 22:09 ` Junio C Hamano [this message]
2026-07-08 1:02 ` [PATCH v7 0/3] Teach git-replay(1) to linearize merge commits Junio C Hamano
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=xmqqbjcawnhp.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=toon@iotcl.com \
/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