git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Question on for-each-ref and --contains

From
Jeff King <peff@peff.net>
Date
Dec 23, 2014, 08:52 UTC
Message-ID
<20141223085214.GA25444@peff.net>
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:
Show 12 quoted lines
> 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
Previous: Øystein Walle
Message 3 of 3 in “Question on for-each-ref and --contains”
  1. St. BlindDec 23, 2014
  2. Øystein WalleDec 23, 2014
  3. Jeff KingDec 23, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.