From: Phillip Wood <phillip.wood123@gmail.com>
To: Pablo Sabater <pabloosabaterr@gmail.com>, git@vger.kernel.org
Cc: gitster@pobox.com, christian.couder@gmail.com,
karthik.188@gmail.com, jltobler@gmail.com,
ayu.chandekar@gmail.com, siddharthasthana31@gmail.com,
chandrapratap3519@gmail.com
Subject: Re: [GSoC RFC PATCH 0/1] graph: add indentation for commits preceded by a root
Date: Thu, 14 May 2026 16:15:28 +0100 [thread overview]
Message-ID: <26d887d2-6ec2-4af1-b0bd-8e9b017bb4dd@gmail.com> (raw)
In-Reply-To: <20260402211717.3604688-1-pabloosabaterr@gmail.com>
Hi Pablo
On 02/04/2026 22:17, Pablo Sabater wrote:
> When having a history with multiple root commits and drawing the history
> near the roots, the graphing engine renders the commit one below the other,
> seeming that they are related, which makes the graph confusing.
>
> This issue was reported by Junio at:
> https://lore.kernel.org/git/xmqqikaawrpx.fsf@gitster.g/
>
> e.g.:
>
> * root-B
> * child-A2
> * child-A1
> * root-A
>
> [...]
>
> * root-B
> * child-A2
> /
> * child-A1
> * root-A
I'm rather late to the party here, but personally I find the indentation
a bit confusing, it would be clearer to me if we had a blank line after
a root commit
* root-B
* child-A2
* child-A1
* root-A
It takes the same amount of vertical space but keeps the children of
root-A together.
Thanks
Phillip
> This is done by adding a is_placeholder flag to the columns, the root commit
> is actually there but marked as a placeholder
>
> e.g.:
>
> * root-B
> (B) * child-A2
> /
> * child-A1
> * root-A
>
> (B) would be root-B column with the placeholder flag active.
>
> Then teaching the rendering function to print a padding ' ' when meeting a
> placeholder column outputs the second example.
>
> There could also be the case where there are multiple roots
>
> without the patch:
>
> * A root
> * B root
> * C root
> * D1 child
> * D root
>
> with the patch, the indentation cascades:
>
> * A root
> * B root
> * C root
> * D1 child
> _ /
> /
> /
> * D root
>
> the _ / might look weird but that's how the collapsing rendering does it
> for big gaps, this case being from the 4th column to the 0th column.
> Another patch could change the collapsing rendering for placeholders ?
> I haven't done it to keep it minimal, but a follow up could make it
> to be straight '/'. This would make it bigger but easier for the eye to follow.
> IMO is not worth it, but opinions are welcome.
>
> The patch also adds tests for different cases like a root preceding multiple
> parents merges and the examples above.
>
> There could be some edge cases still so any testing is very welcome.
>
> Pablo Sabater (1):
> graph: add indentation for commits preceded by a root
>
> graph.c | 68 ++++++++++++++++--
> t/t4215-log-skewed-merges.sh | 136 +++++++++++++++++++++++++++++++++++
> 2 files changed, 198 insertions(+), 6 deletions(-)
>
>
> base-commit: 256554692df0685b45e60778b08802b720880c50
next prev parent reply other threads:[~2026-05-14 15:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 21:17 [GSoC RFC PATCH 0/1] graph: add indentation for commits preceded by a root Pablo Sabater
2026-04-02 21:17 ` [GSoC RFC PATCH 1/1] " Pablo Sabater
2026-04-03 17:55 ` Junio C Hamano
2026-04-03 18:07 ` Pablo
2026-04-03 5:04 ` [GSoC RFC PATCH 0/1] " Junio C Hamano
2026-04-03 8:25 ` Pablo
2026-04-04 9:24 ` [GSoC RFC PATCH v2 0/1] graph: add indentation for commits preceded by a parentless commit Pablo Sabater
2026-04-04 9:24 ` [GSoC RFC PATCH v2 1/1] " Pablo Sabater
2026-04-10 16:25 ` [GSoC RFC PATCH v2 0/1] " Pablo
2026-04-10 16:54 ` Junio C Hamano
2026-04-27 10:28 ` [GSoC PATCH v3 " Pablo Sabater
2026-04-27 10:28 ` [GSoC PATCH v3 1/1] " Pablo Sabater
2026-05-13 23:02 ` Jeff King
2026-05-14 10:19 ` Pablo Sabater
2026-04-27 10:35 ` [GSoC PATCH v3 0/1] " Pablo
2026-05-14 15:15 ` Phillip Wood [this message]
2026-05-14 17:45 ` [GSoC RFC PATCH 0/1] graph: add indentation for commits preceded by a root Pablo Sabater
2026-05-15 9:33 ` Phillip Wood
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=26d887d2-6ec2-4af1-b0bd-8e9b017bb4dd@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=ayu.chandekar@gmail.com \
--cc=chandrapratap3519@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jltobler@gmail.com \
--cc=karthik.188@gmail.com \
--cc=pabloosabaterr@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=siddharthasthana31@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