git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git log --graph --oneline issues (very small edge case)

From
Jason Pyeron <jpyeron@pdinc.us>
Date
Dec 19, 2014, 16:27 UTC
Message-ID
<71B93170AE5D4ED08EF12CED427299C4@black>
When a repo has multiple initial commits, the oneline graph can get borked.
It will put a commit * with no parent directly above the next commit * with no children. This gives the false impression that the two commits are a sequence on a branch. E.g:
* xxxxxxx update of A (#0011)
* xxxxxxx merge of B->A (#0010)
|\
| * xxxxxxx update of B (#0009)
* | xxxxxxx update of A (#0008)
* | xxxxxxx update of A (#0007)
| * xxxxxxx update of B (#0006)
| * xxxxxxx update of B (#0005)
| * xxxxxxx inital commit B (#0004)
| * xxxxxxx update of A' (#0003)
| * xxxxxxx fork of A (#0002)
|/
* xxxxxxx intial commit A (#0001)
It should put a blank line after a commit without a parent, like so:
* xxxxxxx update of A (#0011)
* xxxxxxx merge of B->A (#0010)
|\
| * xxxxxxx update of B (#0009)
* | xxxxxxx update of A (#0008)
* | xxxxxxx update of A (#0007)
| * xxxxxxx update of B (#0006)
| * xxxxxxx update of B (#0005)
| * xxxxxxx inital commit B (#0004)
|
| * xxxxxxx update of A' (#0003)
| * xxxxxxx fork of A (#0002)
|/
* xxxxxxx intial commit A (#0001)
Unless it is the last commit to be output.
I hit this in the wild https://github.com/pdinc-oss/CipherShed.git, but now that the branches are merged the graph looks fine.
-Jason
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.
Next: Junio C Hamano
Message 1 of 2 in “git log --graph --oneline issues (very small edge case)”
  1. Jason PyeronDec 19, 2014
  2. Junio C HamanoDec 20, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.