Re: [GSoC RFC PATCH 0/1] graph: add indentation for commits preceded by a root
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 19, 2026, 00:03 UTC
- Message-ID
- <xmqq8q9gb704.fsf@gitster.g>
- In-Reply-To
- <CAN5EUNQoKRqt3FGLmzRGpPU1nO5jCAogP8Wm9gBZXuPbMNbQAw@mail.gmail.com>
Pablo Sabater <pabloosabaterr@gmail.com> writes:
Show 22 quoted lines
> 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.