git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "St. Blind" <st.s.blind@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Question on for-each-ref and --contains
Date: Tue, 23 Dec 2014 03:52:14 -0500	[thread overview]
Message-ID: <20141223085214.GA25444@peff.net> (raw)
In-Reply-To: <CA++b5FaiKC2+U-Q_q7tBBjX2s+rLY6725H2ScUW26eOf-nmRjw@mail.gmail.com>

On Tue, Dec 23, 2014 at 09:50:50AM +0200, St. Blind wrote:

> In order to make some analyses here I had to build certain report
> lists of our remote refs, based on various "containing" and "merged"
> rules. We have more than hundred such refs at a time usually. So my
> poor script which tries to make decisions with the help of rev-list
> for each ref on each arbitrary commit is not really fast. The
> git-branch --contains and --merged are not very handy too, because the
> output is not really flexible, and the --merged works on HEAD only.
> 
> Do you think is a good idea to have the option "--contains" in
> for-each-ref too (and/or in rev-list directly)?
> If yes, then probably also the --(no-)merged options, but hopefully
> with the arbitrary commit this time?

Yes, it's absolutely a good idea to teach for-each-ref these options.
This is something I've been meaning to work on for a while. This is at
least the second time it has been mentioned in the past week or so, too.
Maybe I'll try to move it forward soon. The last attempt got stuck on
factoring out a single universal "--contains" traversal (we have 2
implementations):

  http://thread.gmane.org/gmane.comp.version-control.git/252472

I don't think there was any particular blocker besides time to look at
and think about it. We need to be very sure of the termination
requirements for the traversal (there was some discussion in the thread,
but I think I convinced myself that some of the optimization suggestions
there could return wrong answers for some cases).

-Peff

      parent reply	other threads:[~2014-12-23  8:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23  7:50 Question on for-each-ref and --contains St. Blind
2014-12-23  8:19 ` Øystein Walle
2014-12-23  8:52 ` Jeff King [this message]

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=20141223085214.GA25444@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=st.s.blind@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).