Re: log --graph draws an orphaned branch with parents
- From
- herr.kaste <herr.kaste@gmail.com>
- Date
- Nov 3, 2026, 19:25 UTC
- Message-ID
- <CAFzd1+5s6V+YC3onNjYQmxRPVnsMROpsVi=qy1mg2=LOAnU+gg@mail.gmail.com>
- In-Reply-To
- <CAFzd1+4Jx_sWvMrV10gi9400BBNJOUXW0WwsypiM7yCh5x8fow@mail.gmail.com>
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
Actual output:
* 40a81a9 M |\ \ | * | 1d9120a R / | * 5a29a85 T |/ * f1cd12c B
With --no-graph-indent:
* 40a81a9 M |\ * | 1d9120a R / | * 5a29a85 T |/ * f1cd12c B
Regards Caspar
Am Di., 13. Okt. 2026 um 21:00 Uhr schrieb herr.kaste <herr.kaste@gmail.com>:
Show 66 quoted lines
> > Hi! I have the following: > > Checkout https://github.com/packagecontrol/thecrawl.git then draw the graph > > $ git log --graph --all --oneline > > a few pages down, (I don't have a more minimal reproduction, --all is required) > I see > > What happened? (Actual behavior) > > * | | 03b117815 Changed metadata of `Modelines` > * | | 30f679f1f Bulk edit > \ | | > * | | 5a2cecdd9 Initial revision > / / > | | * 6062ecf4f (origin/feat/compare-registries) Add script to compare > two registries > | |/ > | * 8f034813a Clarify fatal crawl skip logs > > 5a2cecdd9 is actually the birth of an orphaned branch, gitk also shows > it like that. > > What did you expect to happen? (Expected behavior) > > E.g. something like this: > > ● | | 03b117815 Changed metadata of `Modelines` > ● | | 30f679f1f Bulk edit > ● | | 5a2cecdd9 Initial revision > / / > | | ● 6062ecf4f (origin/feat/compare-registries) ... > | |/ > | ● 8f034813a Clarify fatal crawl skip logs > > What's different between what you expected and what actually happened? > An obvious drawing error, 5a2cecdd9 is drawn as if it had parents, and > the rightmost lane goes to nirvana. > > [System Info] > git version: > git version 2.56.0.windows.2 > cpu: x86_64 > built from commit: cc4dbf752a05efdc0e04e71fd3e8110d11bdd35c > sizeof-long: 4 > sizeof-size_t: 8 > shell-path: D:/git-sdk-64-build-installers/usr/bin/sh > rust: disabled > feature: fsmonitor--daemon > gettext: enabled > libcurl: 8.22.0 > OpenSSL: OpenSSL 3.5.9 29 Sep 2026 > zlib: 1.3.2 > SHA-1: SHA1_DC > SHA-256: SHA256_BLK > default-ref-format: files > default-hash: sha1 > uname: Windows 10.0 26200 > compiler info: gnuc: 16.2 > libc info: no libc information available > $SHELL (typically, interactive shell): C:\Dev\Git\usr\bin\bash.exe > > Regards > Caspar Duregger