{"thread":{"id":"38229","subject":"Question on for-each-ref and --contains","startedAt":"2014-12-23T07:50:50Z","lastAt":"2014-12-23T08:52:14Z","messageCount":3,"participants":["St. Blind","Øystein Walle","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"253990","messageId":"CA++b5FaiKC2+U-Q_q7tBBjX2s+rLY6725H2ScUW26eOf-nmRjw@mail.gmail.com","threadId":"38229","inReplyTo":null,"subject":"Question on for-each-ref and --contains","fromName":"St. Blind","fromEmail":"st.s.blind@gmail.com","sentAt":"2014-12-23T07:50:50Z","receivedAt":"2014-12-23T07:50:50Z","isPatch":false,"sender":{"key":"st.s.blind@gmail.com","avatar":null},"body":"Hi.\n\nIn order to make some analyses here I had to build certain report\nlists of our remote refs, based on various \"containing\" and \"merged\"\nrules. We have more than hundred such refs at a time usually. So my\npoor script which tries to make decisions with the help of rev-list\nfor each ref on each arbitrary commit is not really fast. The\ngit-branch --contains and --merged are not very handy too, because the\noutput is not really flexible, and the --merged works on HEAD only.\n\nDo you think is a good idea to have the option \"--contains\" in\nfor-each-ref too (and/or in rev-list directly)?\nIf yes, then probably also the --(no-)merged options, but hopefully\nwith the arbitrary commit this time?\n\nThank you in advance,\nBlind.\n"},{"id":"253991","messageId":"loom.20141223T091605-427@post.gmane.org","threadId":"38229","inReplyTo":"CA++b5FaiKC2+U-Q_q7tBBjX2s+rLY6725H2ScUW26eOf-nmRjw@mail.gmail.com","subject":"Re: Question on for-each-ref and --contains","fromName":"Øystein Walle","fromEmail":"oystwa@gmail.com","sentAt":"2014-12-23T08:19:04Z","receivedAt":"2014-12-23T08:19:04Z","isPatch":false,"sender":{"key":"oystwa@gmail.com","avatar":"https://avatars.githubusercontent.com/u/794585?v=4"},"body":"St. Blind <st.s.blind <at> gmail.com> writes:\n\n> \n> The > git-branch --contains and --merged are not very handy too,\n> because the> output is not really flexible, and the --merged works\n> on HEAD only.\n> \n \n`git branch --merged foo` will list branches that are merged in the history\nof 'foo'. And the equivalent is true for `--contains`. Not sure if that will\nsolve everything, though.\n\nØsse\n"},{"id":"253993","messageId":"20141223085214.GA25444@peff.net","threadId":"38229","inReplyTo":"CA++b5FaiKC2+U-Q_q7tBBjX2s+rLY6725H2ScUW26eOf-nmRjw@mail.gmail.com","subject":"Re: Question on for-each-ref and --contains","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-12-23T08:52:14Z","receivedAt":"2014-12-23T08:52:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Dec 23, 2014 at 09:50:50AM +0200, St. Blind wrote:\n\n> In order to make some analyses here I had to build certain report\n> lists of our remote refs, based on various \"containing\" and \"merged\"\n> rules. We have more than hundred such refs at a time usually. So my\n> poor script which tries to make decisions with the help of rev-list\n> for each ref on each arbitrary commit is not really fast. The\n> git-branch --contains and --merged are not very handy too, because the\n> output is not really flexible, and the --merged works on HEAD only.\n> \n> Do you think is a good idea to have the option \"--contains\" in\n> for-each-ref too (and/or in rev-list directly)?\n> If yes, then probably also the --(no-)merged options, but hopefully\n> with the arbitrary commit this time?\n\nYes, it's absolutely a good idea to teach for-each-ref these options.\nThis is something I've been meaning to work on for a while. This is at\nleast the second time it has been mentioned in the past week or so, too.\nMaybe I'll try to move it forward soon. The last attempt got stuck on\nfactoring out a single universal \"--contains\" traversal (we have 2\nimplementations):\n\n  http://thread.gmane.org/gmane.comp.version-control.git/252472\n\nI don't think there was any particular blocker besides time to look at\nand think about it. We need to be very sure of the termination\nrequirements for the traversal (there was some discussion in the thread,\nbut I think I convinced myself that some of the optimization suggestions\nthere could return wrong answers for some cases).\n\n-Peff\n"}]}