From: Adam Simpkins <adam@adamsimpkins.net>
To: Teemu Likonen <tlikonen@iki.fi>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: log --graph --first-parent weirdness
Date: Wed, 4 Jun 2008 11:04:33 -0700 [thread overview]
Message-ID: <20080604180432.GA31437@adamsimpkins.net> (raw)
In-Reply-To: <20080604173820.GA3038@mithlond.arda.local>
On Wed, Jun 04, 2008 at 08:38:20PM +0300, Teemu Likonen wrote:
> Junio C Hamano wrote (2008-06-04 10:12 -0700):
>
> > Teemu Likonen <tlikonen@iki.fi> writes:
> >
> > > The output of "git log --graph --first-parent" seems weird.
>
> <snip>
>
> > We could turn --graph automatically off if --first-parent is given,
> > but I tend to agree with you that the right behaviour is to show the
> > same "everything prefixed with '| ', wasting two columns without good
> > reason" output as you would see on a true linear history.
>
> To me it's perfectly fine to turn off --graph when used with
> --first-parent, but yes, generally users might expect to see a line of
> M's, *'s and |'s there. At least it would clearly show which commits are
> merges and which are not.
It should be pretty simple to fix this as suggested. There are two
places in graph.c where we loop over the current commit's parents.
Changing those to break out after the first commit when
revs->first_parent_only is set should result in the desired behavior.
I'll try to get some time this evening or tomorrow to create a patch.
--
Adam Simpkins
adam@adamsimpkins.net
next prev parent reply other threads:[~2008-06-04 18:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-04 15:00 log --graph --first-parent weirdness Teemu Likonen
2008-06-04 15:08 ` Teemu Likonen
2008-06-04 17:12 ` Junio C Hamano
2008-06-04 17:38 ` Teemu Likonen
2008-06-04 18:04 ` Adam Simpkins [this message]
2008-06-05 8:56 ` [PATCH] graph API: fix "git log --graph --first-parent" Adam Simpkins
2008-06-04 18:05 ` log --graph --first-parent weirdness Junio C Hamano
2008-06-05 1:37 ` Ping Yin
2008-06-05 9:28 ` Adam Simpkins
2008-06-05 9:50 ` Teemu Likonen
2008-06-05 18:31 ` Junio C Hamano
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=20080604180432.GA31437@adamsimpkins.net \
--to=adam@adamsimpkins.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tlikonen@iki.fi \
/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;
as well as URLs for NNTP newsgroup(s).