From: Pablo Sabater Date: Sun, 14 Jun 2026 05:28:24 GMT Subject: Re: [PATCH v5 2/2] graph: indent visual root in graph Message-ID: In-Reply-To: El dom, 14 jun 2026 a las 6:05, Junio C Hamano () escribió: > > Pablo Sabater writes: > > [jc: Taylor CC'ed for his expertise and opinion on the quoted part > that mucks with commit-graph files during the test] > > > diff --git a/t/t4218-log-graph-indentation.sh b/t/t4218-log-graph-indentation.sh > > new file mode 100755 > > index 0000000000..ccf15c0a52 > > --- /dev/null > > +++ b/t/t4218-log-graph-indentation.sh > > @@ -0,0 +1,467 @@ > > +#!/bin/sh > > ... > > +# disable commit-graph topo order to have the graph to render in different > > +# ways (used in --first-parent tests to have multiple visual roots while a > > +# column is active at the same time). > > +unset_commit_graph() { > > + sane_unset GIT_TEST_COMMIT_GRAPH && > > + rm -f .git/objects/info/commit-graph && > > + rm -rf .git/objects/info/commit-graphs > > +} > > I do not quite understand why having commit-graph makes the test > result unpredictable here, but wouldn't we have a more stable way > to disable use of commit-graph than going into filesystem and muck > with the implementation detail like the above? > > Thanks. Hi! 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. 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 to: * 41_octopus * 41_B \ * 41_A * 43_B \ * 43_A * 42_B * 42_A While the output it's ok and the indentation works the excluded but forced to be rendered parents are not being rendered at the same time as an active column is. On the unset_commit_graph function I had to remove those files because even if it is GIT_TEST_COMMIT_GRAPH unset if there are files from previous tests they still change the output. Maybe there is a way to get this more cleanly but from what I tried it didn't work as I wanted, sorry. Thanks, Pablo.