🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
1 messages
1 total messages Started by Junio C Hamano Thu, 26 Nov 2026 07:17
Re: [PATCH v2] graph: do not fuse merge parents with the column to their left
#3890
Author: Junio C Hamano
Date: Thu, 26 Nov 2026 07:17
45 lines
14209 bytes
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads