git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Listing commits that are _exclusively_ available on a given branch
@ 2012-03-23 14:36 Johan Herland
  2012-03-23 17:06 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Herland @ 2012-03-23 14:36 UTC (permalink / raw)
  To: Git mailing list

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-23 19:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-23 14:36 Listing commits that are _exclusively_ available on a given branch Johan Herland
2012-03-23 17:06 ` 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

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).