From: Junio C Hamano <gitster@pobox.com>
To: Dominik Maier <dmnk@google.com>
Cc: git@vger.kernel.org, Caspar Duregger <caspar.duregger@gmail.com>,
Pablo Sabater <pabloosabaterr@gmail.com>,
dmnk+artist@google.com
Subject: Re: [PATCH v2] graph: do not fuse merge parents with the column to their left
Date: Wed, 25 Nov 2026 23:17:38 -0800 [thread overview]
Message-ID: <xmqqy0agnjsd.fsf@gitster.g> (raw)
In-Reply-To: <20261124180557.70212-1-dmnk@google.com> (Dominik Maier's message of "Tue, 24 Nov 2026 18:05:57 +0000")
Dominik Maier <dmnk@google.com> writes:
> When a merge is skewed to the left and its second parent is the column
> right next to it, the edge to that parent is lost:
>
> | | * M | | * M
> | |/|\ | |/|\
> |/| | => |/|/ /
> | | * C | | * C
Having this diagram makes the visual breakage much easier to follow than
in v1.
This only happens for merges with at least three parents, correct?
Because a two-parent left-skewed merge sets '.edges_added' to 0 and
skips the shortcut altogether. If that is the case, it might be worth
saying in the commit log message.
The diagram already makes that clear enough in context.
> Only take the shortcut for existing non-parent columns (idx < 0), which
> is the case it was written for.
Small wording nit here.
In graph_update_columns(), calling graph_insert_into_new_columns() with
(idx == -1) happens for existing columns passing past the merge, and
when the shortcut triggers, that existing column actually matches the
merge's final parent.
Instead of saying "existing non-parent columns (idx < 0)", phrasing
"existing columns passing past the merge (idx < 0)" may be more exact,
though the code change itself is completely clear.
Looking at the two callers of graph_insert_into_new_columns() (both are
in graph_update_columns()) confirms why idx < 0 is the correct guard to
add to fix the issue.
Let's queue this and mark the topic as ready for 'next'.
> Helped-by: Caspar Duregger <caspar.duregger@gmail.com>
> Signed-off-by: Dominik Maier <dmnk@google.com>
Thanks, both of you.
prev parent reply other threads:[~2026-11-26 7:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 19:22 [PATCH] graph: do not fuse merge parents into left columns Dominik Maier
2026-11-20 10:50 ` Caspar Duregger
2026-11-24 18:05 ` [PATCH v2] graph: do not fuse merge parents with the column to their left Dominik Maier
2026-11-25 9:37 ` Caspar Duregger
2026-11-26 7:17 ` Junio C Hamano [this message]
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=xmqqy0agnjsd.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=caspar.duregger@gmail.com \
--cc=dmnk+artist@google.com \
--cc=dmnk@google.com \
--cc=git@vger.kernel.org \
--cc=pabloosabaterr@gmail.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