Re: [BUG] git-log shows first parent and repeated last for octopus merge

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

 



Johannes Schindelin wrote:
> On Wed, 18 Oct 2006, Jakub Narebski wrote:
> 
> > When trying to find how many merges and how many octopus merges (merges with
> > more than two parents) are in git.git repository I have encountered the
> > following strange output of git-log:
> > 
> >  1000:jnareb@roke:~/git> git log --parents --full-history --max-count=1 \
> >    211232bae64bcc60bbf5d1b5e5b2344c22ed767e -- a//b
> >  commit 211232bae64bcc60bbf5d1b5e5b2344c22ed767e <last parent repeated>
> >  Merge: d0d0d0b... d0d0d0b... d0d0d0b... d0d0d0b... d0d0d0b...
> >  [...]
> 
> This happens because a//b rewrites the history, i.e. the parents are 
> edited. IMHO it makes no sense at all to show the parents in such a case, 
> since they are bogus.

Or rather it has no sense to _repeat_ rewritten parent the number of times
the commit has parents originally. Compare git-log and git-rev-list results:

1010:jnareb@roke:~/git> git rev-list --full-history --header --parents \
  --max-count=2 211232bae64bcc60bbf5d1b5e5b2344c22ed767e -- a//b
211232bae64bcc60bbf5d1b5e5b2344c22ed767e d0d0d0bd3c2c4591ffbc292d7e082e8ad8f2057f
tree cdafa88fa4ed7fcc7bb6c64d62e2d7c4d3b65e42
parent fc54a9c30ccad3fde5890d2c0ca2e2acc0848fbc
parent 9e30dd7c0ecc9f10372f31539d0122db97418353
parent c4b83e618f1df7d8ecc9392fa40e5bebccbe6b5a
parent 660265909fc178581ef327076716dfd3550e6e7b
parent b28858bf65d4fd6d8bb070865518ec43817fe7f3
author Junio C Hamano <junkio@xxxxxxx> 1115335014 -0700
committer Junio C Hamano <junkio@xxxxxxx> 1115335014 -0700

    Octopus merge of the following five patches.
    
      Update git-apply-patch-script for symbolic links.
      Make git-prune-script executable again.
      Do not write out new index if nothing has changed.
      diff-cache shows differences for unmerged paths without --cache.
      Update diff engine for symlinks stored in the cache.
    
    Signed-off-by: Junio C Hamano <junkio@xxxxxxx>
d0d0d0bd3c2c4591ffbc292d7e082e8ad8f2057f 54c26fb9d0cdff94c7717125d0a222b324bfea8a
[...]

1014:jnareb@roke:~/git> PAGER= git log --full-history --parents \
  --max-count=2 211232bae64bcc60bbf5d1b5e5b2344c22ed767e -- a//b
commit 211232bae64bcc60bbf5d1b5e5b2344c22ed767e d0d0d0bd3c2c4591ffbc292d7e082e8ad8f2057f d0d0d0bd3c2c4591ffbc292d7e082e8ad8f2057f d0d0d0bd3c2c4591ffbc292d7e082e8ad8f2057f d0d0d0bd3c2c4591ffbc292d7e082e8ad8f2057f d0d0d0bd3c2c4591ffbc292d7e082e8ad8f2057f
Merge: d0d0d0b... d0d0d0b... d0d0d0b... d0d0d0b... d0d0d0b...
Author: Junio C Hamano <junkio@xxxxxxx>
Date:   Thu May 5 16:16:54 2005 -0700

    Octopus merge of the following five patches.
    
      Update git-apply-patch-script for symbolic links.
      Make git-prune-script executable again.
      Do not write out new index if nothing has changed.
      diff-cache shows differences for unmerged paths without --cache.
      Update diff engine for symlinks stored in the cache.
    
    Signed-off-by: Junio C Hamano <junkio@xxxxxxx>

commit d0d0d0bd3c2c4591ffbc292d7e082e8ad8f2057f 54c26fb9d0cdff94c7717125d0a222b324bfea8a 54c26fb9d0cdff94c7717125d0a222b324bfea8a
[...]

-- 
Jakub Narebski
Poland
-
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]