Subject: Re: how to list commits on branch since last merge

From: Andreas Schwab <[email-masked]>
Date: Tue, 08 Mar 2011 20:08:55 +0100

Jeff King <[email-masked]> writes:

> On Tue, Mar 08, 2011 at 05:11:16AM -0500, Jay Soffian wrote:
>
>> Going back to my original picture, I mean commit m:
>> 
>>   o---o---x---o---...    foo
>>    \       \
>>     o---o---m---o---...  bar
      b1
>> 
>> merge-base foo bar gives me x; to get m I then need to grep the output
>> of rev-list --parents for x.
>
> Isn't the merge the first commit in bar that is not in foo? IOW:
>
>   git rev-list foo..bar | tail -n 1

That would show the commit marked b1 above, wouldn't it?  ^foo cuts only
x and its parents, but not the other parent of m.

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."