From: Pablo Sabater Date: Tue, 03 Nov 2026 21:27:04 GMT Subject: Re: log --graph draws an orphaned branch with parents Message-ID: In-Reply-To: On Tue Nov 3, 2026 at 7:25 PM WET, herr.kaste wrote: > Finally had time for a repro (tested with git 2.56.0.windows.3): > > sh > git init -q -b main repro && cd repro > export GIT_COMMITTER_DATE="@1700000000 +0000" > GIT_AUTHOR_DATE="@1700000000 +0000" > git commit -q --allow-empty -m B > git switch -q -c topic > git commit -q --allow-empty -m T > git switch -q --orphan orphan > git commit -q --allow-empty -m R > git merge -q --allow-unrelated-histories --no-ff -m M main > git log --graph --oneline --all Hi! Thanks for the repro and the bug report. > > Actual output: The bug is because the indentation state GRAPH_PRE_ROOT is being triggered, due to "R" being a root. What this state does is add a new row to connect the indentation: > > * 40a81a9 M > |\ > \ | ^^^ This one > * | 1d9120a R Then it pushes everything to the right. > / > | * 5a29a85 T > |/ > * f1cd12c B > > With --no-graph-indent: > > * 40a81a9 M > |\ > * | 1d9120a R > / > | * 5a29a85 T > |/ > * f1cd12c B The fix should be that the rendering of the graph is the same with the indentation or without it, as there is nothing ambiguous in this case that needs it. I think I may be able to see how to fix it tomorrow, but I'm quite busy until next week. Regards, Pablo