Re: finding the merge of two or more commits

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

 



On Thu, Oct 29, 2009 at 05:34:45PM -0400, Avery Pennarun wrote:

> On Thu, Oct 29, 2009 at 5:12 PM, E R <pc88mxer@xxxxxxxxx> wrote:
> > That is, I don't want to merge c1 and c2 myself, but I want to know if
> > someone else has merged c1 and c2, performed any conflict resolution
> > and committed the result.
> 
> Try this:
> 
> (git branch -a --contains c1; git branch -a --contains c2) | sort | uniq -d
> 
> It's not exactly pretty, but it works.

That will tell you whether any branch contains both of them, which is
not exactly what the original poster asked for (though it may have been
what he meant :) ). To see if there is a specific merge of those two
commits, you can do:

  git log --all --format='%H %P' | grep " $c1" | grep " $c2" | cut -d' ' -f1

-Peff
--
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]