Git development
 help / color / mirror / Atom feed
From: Adam Simpkins <adam@adamsimpkins.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add new git-graph command
Date: Mon, 31 Mar 2008 00:09:05 -0700	[thread overview]
Message-ID: <20080331070904.GA19242@adamsimpkins.net> (raw)
In-Reply-To: <7vprtbwz5v.fsf@gitster.siamese.dyndns.org>

On Sun, Mar 30, 2008 at 04:49:16PM -0700, Junio C Hamano wrote:
> What's wrong with "tig -g", I have to wonder...

As I mentioned in my initial email, I tried using the graph in tig,
but I found it very hard to read.  However, going back and taking a
closer look at tig, I think its graph is just plain wrong in some
cases.

For example, here's a comparison of the first several lines of output
of "git-graph --date-order --all" and "tig -- --all" in my repository
for one of the projects I am working on.  I've replaced the commit
subjects with just the abbreviated hashes.  (Hopefully your mail
reader displays this with a monospace font.)

git-graph:

*   8076867
*   2613e2b
M    542f526
|\  
* |   642b381
| | *   e73dfa2
| \ \ 
|  \ \ 
M-. \ \   64e1d85
|\ \ \ \ 
| | * | |   836521f
| | | | | *   ce43181
| | | | | *   eaeeb08
| | | | | M    79d3db3
| | | | | |\  
| | | | | | *   da5bc9e
| * | | | | |   b947aab
| | | | | M  \   9ade1bc
| | | | | |\  | 
| | | | * | | |   8f3727b
| | | | * | | |   2d102cd
* | | | | | | |   bf5c6e3
| |/ / / / / / 
|/| / / / / / 
* | | | | | |   a570370
|/ / / / / / 
* | | | | |   dde9a00
| | | | | *   09048ce
| | | | |/ 
| | | | *   4ee2351



tig (version 0.10.git):

+ 8076867
* 2613e2b
M 542f526
* | 642b381
| | + e73dfa2
M |  \ \ 64e1d85
|`.`* | | 836521f
| | | | | + ce43181
| | | | | * eaeeb08
| | | | | M 79d3db3
| | | | | |`* da5bc9e
| * | | | | | b947aab
| | | | | M  \ 9ade1bc
| | | | * |`.`. 8f3727b
| | | | * | | | 2d102cd
* | | | | | | | bf5c6e3
*' / / / / / / a570370
*' / / / / / dde9a00
| | | | | * 09048ce
| | | | *' 4ee2351


Looking at the tig output, it seems like tig is definitely screwing up
around the 3-way merge at 64e1d85.  The way I read the output, it
looks like it is telling me that commit 836521f is a parent of
542f526, which is incorrect.

It also doesn't seem to display things correctly when branch lines
need to cross.  For example, 836521f is a child of a570370, and
b947aab is a child of dde9a00.  However, the way I read tig's graph,
it looks like it is telling me exactly the opposite--that 836521f is a
child of dde9a00 and b947aab is a child of a570370.

I think part of the problem is that tig displays exactly 1 commit per
line.  It's hard to represent octopus merges and crossing branches if
it all has to fit in 1 line.  This is why git-graph sometimes takes
extra lines in between commits to display where the branch lines are
going.

The git-forest command that Matthieu Moy pointed out also seems to do
a good job of representing the graph, while being a bit more compact
than git-graph when displaying crossing branches.  (I just joined the
list in the last couple of days, so I wasn't aware of git-forest.  I
did try googling for similar tools before I started, but only came up
with tig.)

-- 
Adam Simpkins
adam@adamsimpkins.net

  reply	other threads:[~2008-03-31  7:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-30 19:58 [PATCH] Add new git-graph command Adam Simpkins
2008-03-30 20:41 ` Jakub Narebski
2008-03-30 22:00   ` Adam Simpkins
2008-03-30 20:44 ` Matthieu Moy
2008-03-30 22:02   ` Adam Simpkins
2008-03-30 22:54 ` Johannes Schindelin
2008-03-30 23:49 ` Junio C Hamano
2008-03-31  7:09   ` Adam Simpkins [this message]
2008-03-31 17:17 ` Teemu Likonen
2008-03-31 18:47   ` Adam Simpkins
2008-04-01  4:05   ` Stephen Sinclair
2008-04-01  4:29     ` Teemu Likonen
2008-04-01  5:02       ` Jeff King
2008-04-01  5:07       ` Teemu Likonen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080331070904.GA19242@adamsimpkins.net \
    --to=adam@adamsimpkins.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox