Thread (27 messages) flat view 27 messages, 4 authors, 2016-06-15

Re: [PATCH 1/4] Add history graph API

From: Adam Simpkins <hidden>
Date: 2016-06-15 22:44:27

On Mon, Apr 07, 2008 at 10:26:29AM +0300, Teemu Likonen wrote:
As I've spent some time in testing the --graph functionality I'm
spamming my discoveries here.

When limiting the log output to a subdirectory or to a file the graph
becomes quite hard to understand. Probably the easiest way to
demonstrate my point is to compare side by side (for example)

  git log --graph --pretty=oneline -- Documentation/
 
and

  gitk -- Documentation/

in the Git repository. gitk draws lines between commits even when they
are not in direct parent-child relationship (i.e. there is longer series
of commits between them). With log --graph it's hard to tell which
development line some commits come from.
Interesting, I wasn't aware of this gitk behavior.  I took a look at
the gitk code, and they're able to do this by passing the "--parents"
option to "git log".  This causes git to rewrite the parent
information so that it lists the most recent ancestor that is in the
resulting commit set, instead of the actual parent.

It was pretty easy to change "git log --graph" to do the same; I just
sent out a new patch for it.

Thanks for all the testing!

-- 
Adam Simpkins
adam@adamsimpkins.net
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help