Re: log --graph --first-parent weirdness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx> 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@xxxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux