Re: [BUG] git log --graph --pretty=format misplaces graph characters when -p given
- From
Pushkar Singh <pushkarkumarsingh1970@gmail.com>
- Date
- Feb 2, 2026, 17:27 UTC
- Message-ID
- <CALE2CrR5MS=LmXGYW8VbN_trLzMf1tk3BEkh3wv=hju9AWQbeg@mail.gmail.com>
- In-Reply-To
- <trinity-ed0884d3-098e-44be-aa1a-a96f664ce7ca-1770049279182@trinity-msg-rest-gmx-gmx-live-5dd78c558c-fv4g4>
Hi,
I can reproduce this on Git 2.43.0.
Minimal steps:
git init
echo first >test.txt
git add test.txt
git commit -m "first" echo second >>test.txt
git add test.txt
git commit -m "second"Then:
git log --graph --pretty='format:%h' -p
I see the same trailing "|" after the commit hash:
* 0139218|
| diff --git ...So the graph character appears on the wrong line, matching your report.
Tested on WSL/Linux.
Thanks, Pushkar