git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: E R <pc88mxer@gmail.com>, git@vger.kernel.org
Subject: Re: finding the merge of two or more commits
Date: Fri, 30 Oct 2009 14:04:29 -0400	[thread overview]
Message-ID: <20091030180429.GD18583@coredump.intra.peff.net> (raw)
In-Reply-To: <32541b130910291434q1b068918x38c5aec543cb1c2a@mail.gmail.com>

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@gmail.com> 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

  reply	other threads:[~2009-10-30 18:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29 21:12 finding the merge of two or more commits E R
2009-10-29 21:34 ` Avery Pennarun
2009-10-30 18:04   ` Jeff King [this message]
2009-10-30 23:38 ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091030180429.GD18583@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pc88mxer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).