public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* git log --graph --oneline issues (very small edge case)
@ 2014-12-19 16:27 Jason Pyeron
  2014-12-20  0:53 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Pyeron @ 2014-12-19 16:27 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git log --graph --oneline issues (very small edge case)
  2014-12-19 16:27 git log --graph --oneline issues (very small edge case) Jason Pyeron
@ 2014-12-20  0:53 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2014-12-20  0:53 UTC (permalink / raw)
  To: Jason Pyeron; +Cc: git

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-20  0:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-19 16:27 git log --graph --oneline issues (very small edge case) Jason Pyeron
2014-12-20  0:53 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox