Re: [PATCH v5 2/2] graph: indent visual root in graph
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 15, 2026, 15:42 UTC
- Message-ID
- <xmqqzf0vbyj8.fsf@gitster.g>
- In-Reply-To
- <CAN5EUNQ193QyOeTLdu9aXzDeBhFpg38YYBbOLhZLgcg3qfd=uA@mail.gmail.com>
Pablo Sabater <pabloosabaterr@gmail.com> writes:
> It does not make it unpredictable but it makes it not output what I > wanted to test, what I wanted to test is having an active column at > the same time that visual roots in different cases were being rendered > on another column.
Oh, use of commit-graph changes the traversal order, which would affect how the graph is drawn, and there is no way to ensure that we traverse in the same way with or without commit-graph? That's inconvenient. But even without commit-graph, do we guarantee the same traversal order forever? I doubt it. So I suspect that it is a brittle workaround to disable commit-graph in the longer term.
As long as the graph engine shows correct graph no matter what order the commits come out of the revision traversal engine, we won't hurt end-users, but we need our tests to be reproducible, so that is a bit unfortunate.
Anyway, stepping back a bit,
Show 11 quoted lines
> However having GIT_TEST_COMMIT_GRAPH in the last > text for example changes from: > > * 41_octopus > | * 43_B > | \ > | * 43_A > | * 42_B > | * 42_A > * 41_B > * 41_A
Does the "vertically aligned * on 2nd and later columns do not mean any parent-child relationship" rule no longer apply in this version? IOW, does the above graph show that
- 41_A is a parent of 41_B, which is a parent of 41_octopus - 42_A is a parent of 42_B, and - 43_A is a parent of 43_B but is not related to 42_B
? Who are the parents of 41_octopus? It has no relationship with 42_B and 43_B, and unlike what its name suggests, it has only 41_b as its parent (probably with history simplification that makes only these commits shown)?
Show 11 quoted lines
> to: > > * 41_octopus > * 41_B > \ > * 41_A > * 43_B > \ > * 43_A > * 42_B > * 42_A
And this graph shows the same inter-commit relationship. So both are correctly showing what we want to express, but they show the same information differently, making test_cmp unhappy?
Thanks.