git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jed Brown <jed@59A2.org>
Cc: git@vger.kernel.org
Subject: Re: git branch: multiple --merged and --no-merged options?
Date: Fri, 22 Mar 2013 13:50:34 -0400	[thread overview]
Message-ID: <20130322175034.GB29011@sigill.intra.peff.net> (raw)
In-Reply-To: <87fvzwmp23.fsf@59A2.org>

On Fri, Mar 15, 2013 at 02:38:12PM -0500, Jed Brown wrote:

> I find myself frequently running commands like this
> 
>   $ comm -12 <(git branch --no-merged master) <(git branch --merged next)

That's a reasonable thing to want to do.

> when checking for graduation candidates. Of course I first tried
> 
>   $ git branch --no-merged master --merged next

Yeah, sadly that does not work, as we use the same slot for the flag and
store only one of the two (and we also allow only one "--merged" head,
even though you could in theory want to know "merged to X, or merged to
Y"). I do not think there is a reason we could handle both. I think we
could even do it with a single traversal, but even with two traversals,
doing both in-process will be faster (because we only have to pull the
commits from disk once).

So I think it is something that ought to work, but it will need some
code written. Patches welcome. ;)

-Peff

  reply	other threads:[~2013-03-22 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 19:38 Jed Brown
2013-03-22 17:50 ` Jeff King [this message]
2013-03-23  2:46   ` Jed Brown
2013-03-23  8:13     ` Jeff King

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=20130322175034.GB29011@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=jed@59A2.org \
    --subject='Re: git branch: multiple --merged and --no-merged options?' \
    /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

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