Re: [GSoC RFC PATCH 0/1] graph: add indentation for commits preceded by a root
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 10, 2026, 15:21 UTC
- Message-ID
- <xmqqcxxyxvyo.fsf@gitster.g>
- In-Reply-To
- <CAN5EUNSFBC0+aoW1ceGjEiKWBRjzuzUEUjg8Xys5O9rDsJdkjg@mail.gmail.com>
Pablo Sabater <pabloosabaterr@gmail.com> writes:
Show 16 quoted lines
>> > 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? > > We wouldn't see the same output because A and B wouldn't get padded in > that case. Vertical adjacency between indented commits doesn't imply > relation because indentation means that they are "parentless",
Hmph, I guess such "the first column is special in that two commits on consecutive lines with the asterisk on the same column, if only that is on the first column, are parent-child, but it does not hold in all other columns" was beyond my imagination. And that was why I said I am late to the party. Do others find such a rule intuitive? I didn't (and that is what led me to ask the question).
> Anyways, having more than 2 "parentless" commits one after the other > is strange. Cascading is just having a depth counter and printing the > padding depth times, so I'll keep it as it is more intuitive.
Is everbody happy with this version, or will we see an updated final reroll to tie any loose ends? For example, do we need the above "vertically adjacent commits are in parent-child relationship only when they appear on the first column" given as a new instruction in the documentation to help users read and understand what the graph output is trying to tell them?
Thanks.