Subject: Re: [GSoC RFC PATCH 0/1] graph: add indentation for commits preceded by a root

From: Junio C Hamano <[email-masked]>
Date: Tue, 19 May 2026 09:03:23 +0900

Pablo Sabater <[email-masked]> writes:

> By having is_parentless as a flag in 'git_graph' that every stage can
> access we could modify the rendering and maybe completely drop the
> commit placeholders, working on it for v4 but currently renders like
> this
>
>     * A parentless
>       * B parentless
>         * C parentless
>   * D1 child
>   * D parentless
>
> (A has indentation when it could not have, but that would require a
> lookahead if the next commit is also parentless)
> But definitely a step forward.
>
> Do we want cascading or just a fixed indentation?
>
>     * A parentless
>     * B parentless
>     * C parentless
>   * D1 child
>   * D parentless

I am late to the party, but I cannot get how the latter is viable.
If "A" had parent "B" whose parent was "C" that is root, wouldn't we
see the same output?  Or are we adding " parentless" at the end of
the one-liner log message?

The former, with the understanding that "two '*' commit marks
vertically adjacent have parent-child relationship, otherwise we
draw line between '*' to connect them if they have parent-child
relationship", does not have such a problem.