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

2 messages from 2014-12-19 to 2014-12-20. Participants: Jason Pyeron, Junio C Hamano.
Thread: https://gitlist.dev/t/38206

## Jason Pyeron, 2014-12-19 16:27

Subject: git log --graph --oneline issues (very small edge case)
Message-ID: <71B93170AE5D4ED08EF12CED427299C4@black>
URL: https://gitlist.dev/e/71B93170AE5D4ED08EF12CED427299C4%40black

```
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.

```

## Junio C Hamano, 2014-12-20 00:53

Subject: Re: git log --graph --oneline issues (very small edge case)
Message-ID: <xmqqa92jcfbg.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqa92jcfbg.fsf%40gitster.dls.corp.google.com
In-Reply-To: <71B93170AE5D4ED08EF12CED427299C4@black>

```
"Jason Pyeron" <jpyeron@pdinc.us> writes:

> 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.

Sounds vaguely familiar.

http://thread.gmane.org/gmane.comp.version-control.git/236708/focus=239580

My preference is what I wrote after three-dash lines as "It may
actually make sense ...  If we did so, the output ... may look like
this" there.

```
