Skip to contentSkip to conversation

git-rev-list --merge-order bug?

DISCUSSION A Large Angry SCM 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I've noticed that git-rev-list will sometimes return a different *number* of commit objects depending on whether the "--merge-order" switch was used.

For example:

Get a copy of Linus' git git repository from rsync.kernel.org and try the following:

git-rev-list ee28152d03f2cf4b5e3ebc25f7f03f9654d3aa0d \
	^aa03413467a2f2ada900817dc2a8e3904549b5fe |wc -l
git-rev-list ee28152d03f2cf4b5e3ebc25f7f03f9654d3aa0d \
	^aa03413467a2f2ada900817dc2a8e3904549b5fe --merge-order |wc -l

The first git-rev-list returns 4 commits and the second returns 304.

Those commits are dated 2005-05-03 and 2005-05-02. If you use gitk, search for ``builtin'' which will jump to the merge base of the 2 branches.

#1 lore raw
Quoted 9 lines
git-rev-list ee28152d03f2cf4b5e3ebc25f7f03f9654d3aa0d \
        ^aa03413467a2f2ada900817dc2a8e3904549b5fe |wc -l
git-rev-list ee28152d03f2cf4b5e3ebc25f7f03f9654d3aa0d \
        ^aa03413467a2f2ada900817dc2a8e3904549b5fe --merge-order |wc -l

The first git-rev-list returns 4 commits and the second returns 304.

I'll look at it.

It appears to do in cases that look like this:

A

|   B
|   |
|  /

C

git-rev-list B ^A --merge-order

jon.

Signature · 2 lines
homepage: http://www.zeta.org.au/~jon/
blog: http://orwelliantremors.blogspot.com/