git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question on for-each-ref and --contains
@ 2014-12-23  7:50 St. Blind
  2014-12-23  8:19 ` Øystein Walle
  2014-12-23  8:52 ` Jeff King
  0 siblings, 2 replies; 3+ messages in thread
From: St. Blind @ 2014-12-23  7:50 UTC (permalink / raw)
  To: git

Hi.

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?

Thank you in advance,
Blind.

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

* Re: Question on for-each-ref and --contains
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Øystein Walle @ 2014-12-23  8:19 UTC (permalink / raw)
  To: git

St. Blind <st.s.blind <at> gmail.com> writes:

> 
> 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.
> 
 
`git branch --merged foo` will list branches that are merged in the history
of 'foo'. And the equivalent is true for `--contains`. Not sure if that will
solve everything, though.

Øsse

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

* Re: Question on for-each-ref and --contains
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2014-12-23  8:52 UTC (permalink / raw)
  To: St. Blind; +Cc: git

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

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

end of thread, other threads:[~2014-12-23  8:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).