All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: Git mailing list <git@vger.kernel.org>
Subject: Listing commits that are _exclusively_ available on a given branch
Date: Fri, 23 Mar 2012 15:36:33 +0100	[thread overview]
Message-ID: <CALKQrge-=XExhwxuC14uynpuuO3W+f4YO4=X7kFUx33F3HtnyQ@mail.gmail.com> (raw)

Hi,

I'm trying to figure out how to list commits on a given branch that
are not available on any other branch, i.e. the commits that are
exclusive to my branch.

So far I only have this somewhat brute-force alternative:

  git rev-list refs/heads/mybranch --not $(git show-ref --heads | grep
-v refs/heads/mybranch)

Is it possible to phrase this query in a simpler manner? Preferably by
not having to list all refs and then run grep on it...

(I've already tried playing around with "git show-branch" and its
options, but to no avail.)


Have fun! :)

...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

             reply	other threads:[~2012-03-23 14:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 14:36 Johan Herland [this message]
2012-03-23 17:06 ` Listing commits that are _exclusively_ available on a given branch Jeff King
2012-03-23 17:38   ` Junio C Hamano
2012-03-23 17:50     ` Jeff King
2012-03-23 19:39       ` Junio C Hamano

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='CALKQrge-=XExhwxuC14uynpuuO3W+f4YO4=X7kFUx33F3HtnyQ@mail.gmail.com' \
    --to=johan@herland.net \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.