{"thread":{"id":"14396","subject":"feature request: git-log should accept sth like v2.6.26-rc8-227","startedAt":"2008-07-10T18:57:12Z","lastAt":"2008-07-11T20:35:29Z","messageCount":19,"participants":["Toralf Förster","Junio C Hamano","Johannes Schindelin","Jakub Narebski","Linus Torvalds","Dmitry Potapov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"82834","messageId":"200807102057.15063.toralf.foerster@gmx.de","threadId":"14396","inReplyTo":null,"subject":"feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Toralf Förster","fromEmail":"toralf.foerster@gmx.de","sentAt":"2008-07-10T18:57:12Z","receivedAt":"2008-07-10T18:57:12Z","isPatch":false,"sender":{"key":"toralf.foerster@gmx.de","avatar":null},"body":"Hello,\n\ngit-describe gives an informative string about the current status:\ntfoerste@n22 ~/devel/linux-2.6 $ git describe\nv2.6.26-rc9-56-g6329d30\n\nI appended those strings to the names of my UML kernel executables.\nUnfortunately I didn't used the commit id and now I'm wondering whether git\ncould accept v2.6.26-rc9-56 as well in future.\n\n-- \nMfG/Sincerely\n\nToralf Förster\npgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3\n"},{"id":"82836","messageId":"7vk5ftpnek.fsf@gitster.siamese.dyndns.org","threadId":"14396","inReplyTo":"200807102057.15063.toralf.foerster@gmx.de","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-10T19:08:51Z","receivedAt":"2008-07-10T19:08:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Toralf Förster <toralf.foerster@gmx.de> writes:\n\n> git-describe gives an informative string about the current status:\n> tfoerste@n22 ~/devel/linux-2.6 $ git describe\n> v2.6.26-rc9-56-g6329d30\n>\n> I appended those strings to the names of my UML kernel executables.\n> Unfortunately I didn't used the commit id and now I'm wondering whether git\n> could accept v2.6.26-rc9-56 as well in future.\n\nIt does take v2.6.26-rc9-56-g6329d30.\n\nIt will never take v2.6.26-rc9-56.  The world is not linear.\n"},{"id":"82838","messageId":"alpine.DEB.1.00.0807102028420.18205@racer","threadId":"14396","inReplyTo":"200807102057.15063.toralf.foerster@gmx.de","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-10T19:29:07Z","receivedAt":"2008-07-10T19:29:07Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 10 Jul 2008, Toralf Förster wrote:\n\n> I appended those strings to the names of my UML kernel executables. \n> Unfortunately I didn't used the commit id and now I'm wondering whether \n> git could accept v2.6.26-rc9-56 as well in future.\n\nIf that were unambiguous, yes.  But it is not.\n\nCiao,\nDscho\n"},{"id":"82839","messageId":"m3d4lledbn.fsf@localhost.localdomain","threadId":"14396","inReplyTo":"7vk5ftpnek.fsf@gitster.siamese.dyndns.org","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-07-10T19:42:53Z","receivedAt":"2008-07-10T19:42:53Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Toralf Förster <toralf.foerster@gmx.de> writes:\n> \n> > git-describe gives an informative string about the current status:\n> > tfoerste@n22 ~/devel/linux-2.6 $ git describe\n> > v2.6.26-rc9-56-g6329d30\n> >\n> > I appended those strings to the names of my UML kernel executables.\n> > Unfortunately I didn't used the commit id and now I'm wondering whether git\n> > could accept v2.6.26-rc9-56 as well in future.\n> \n> It does take v2.6.26-rc9-56-g6329d30.\n> \n> It will never take v2.6.26-rc9-56.  The world is not linear.\n\nNevertheless it _could_ be unique.\n\nBesides, it would be nice to have some command (git-rev-parse perhaps?)\nwhich could take ambiguous commit-ish, and list all commit which matches\nit.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"82840","messageId":"200807102152.31984.toralf.foerster@gmx.de","threadId":"14396","inReplyTo":"m3d4lledbn.fsf@localhost.localdomain","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Toralf Förster","fromEmail":"toralf.foerster@gmx.de","sentAt":"2008-07-10T19:52:29Z","receivedAt":"2008-07-10T19:52:29Z","isPatch":false,"sender":{"key":"toralf.foerster@gmx.de","avatar":null},"body":"At Thursday 10 July 2008 21:42:53 Jakub Narebski wrote :\n> Besides, it would be nice to have some command (git-rev-parse perhaps?)\n> which could take ambiguous commit-ish, and list all commit which matches\n> it.\n\nOh yes :-)\n\n-- \nMfG/Sincerely\n\nToralf Förster\npgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3\n"},{"id":"82842","messageId":"7v8ww9pkv8.fsf@gitster.siamese.dyndns.org","threadId":"14396","inReplyTo":"m3d4lledbn.fsf@localhost.localdomain","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-10T20:03:39Z","receivedAt":"2008-07-10T20:03:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Besides, it would be nice to have some command (git-rev-parse perhaps?)\n> which could take ambiguous commit-ish, and list all commit which matches\n> it.\n\nHave fun writing it and send in a patch.\n"},{"id":"82849","messageId":"alpine.LFD.1.10.0807101334310.11076@woody.linux-foundation.org","threadId":"14396","inReplyTo":"m3d4lledbn.fsf@localhost.localdomain","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-07-10T20:36:26Z","receivedAt":"2008-07-10T20:36:26Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 10 Jul 2008, Jakub Narebski wrote:\n> \n> Nevertheless it _could_ be unique.\n\nNO IT COULD NOT!\n\nIt doesn't matter if it's unique in _one_ repository. What matters is if \nit is globally unique!\n\nOtherwise, people will start sending these version numbers out in emails, \nand now somethign that was unique in the senders repo is actually not \nunique at the receivers side (or _is_ unique, but points to something \ntotally different).\n\nSo no. A revision number like \"v2.6.26-rc8-227\" is fundamentally and \nutterly broken. No way it should ever be accepted, even as a \"helpful\" \nthing, because it's not helpful at all. It would be a sure way to crap.\n\n\t\tLinus\n"},{"id":"82855","messageId":"alpine.DEB.1.00.0807110022510.3279@eeepc-johanness","threadId":"14396","inReplyTo":"7v8ww9pkv8.fsf@gitster.siamese.dyndns.org","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-10T22:24:28Z","receivedAt":"2008-07-10T22:24:28Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 10 Jul 2008, Junio C Hamano wrote:\n\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n> > Besides, it would be nice to have some command (git-rev-parse \n> > perhaps?) which could take ambiguous commit-ish, and list all commit \n> > which matches it.\n> \n> Have fun writing it and send in a patch.\n\nNote that this really could be a patch, but not for rev-parse.  Patch \nrevision.c instead to parse the argument into _all_ matching revisions.\n\nThe :/ notation I no longer like so much should give you a lot of \ninspiration.\n\nGood luck,\nDscho\n"},{"id":"82885","messageId":"7vk5ftnyhp.fsf@gitster.siamese.dyndns.org","threadId":"14396","inReplyTo":"alpine.DEB.1.00.0807110022510.3279@eeepc-johanness","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-10T22:52:18Z","receivedAt":"2008-07-10T22:52:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Thu, 10 Jul 2008, Junio C Hamano wrote:\n>\n>> Jakub Narebski <jnareb@gmail.com> writes:\n>> \n>> > Besides, it would be nice to have some command (git-rev-parse \n>> > perhaps?) which could take ambiguous commit-ish, and list all commit \n>> > which matches it.\n>> \n>> Have fun writing it and send in a patch.\n>\n> Note that this really could be a patch, but not for rev-parse.  Patch \n> revision.c instead to parse the argument into _all_ matching revisions.\n\nAs Linus pointed out, that is \"all _locally_ matching revisions\".  It is\nof dubious value in a distributed environment.\n"},{"id":"82887","messageId":"200807110108.45072.jnareb@gmail.com","threadId":"14396","inReplyTo":"7vk5ftnyhp.fsf@gitster.siamese.dyndns.org","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-07-10T23:08:43Z","receivedAt":"2008-07-10T23:08:43Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>> On Thu, 10 Jul 2008, Junio C Hamano wrote:\n>>> Jakub Narebski <jnareb@gmail.com> writes:\n>>> \n>>>> Besides, it would be nice to have some command (git-rev-parse \n>>>> perhaps?) which could take ambiguous commit-ish, and list all commit \n>>>> which matches it.\n>>> \n>>> Have fun writing it and send in a patch.\n>>\n>> Note that this really could be a patch, but not for rev-parse.  Patch \n>> revision.c instead to parse the argument into _all_ matching revisions.\n> \n> As Linus pointed out, that is \"all _locally_ matching revisions\".  It is\n> of dubious value in a distributed environment.\n\nIt can be useful for example in situation where shortened sha-1 of\na commit (for example to 6 characters) stops being ambiguous...\n\n-- \nJakub Narebski\nPoland\n"},{"id":"82898","messageId":"alpine.DEB.1.00.0807110145500.3279@eeepc-johanness","threadId":"14396","inReplyTo":"7vk5ftnyhp.fsf@gitster.siamese.dyndns.org","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-10T23:47:37Z","receivedAt":"2008-07-10T23:47:37Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 10 Jul 2008, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > On Thu, 10 Jul 2008, Junio C Hamano wrote:\n> >\n> >> Jakub Narebski <jnareb@gmail.com> writes:\n> >> \n> >> > Besides, it would be nice to have some command (git-rev-parse \n> >> > perhaps?) which could take ambiguous commit-ish, and list all commit \n> >> > which matches it.\n> >> \n> >> Have fun writing it and send in a patch.\n> >\n> > Note that this really could be a patch, but not for rev-parse.  Patch \n> > revision.c instead to parse the argument into _all_ matching revisions.\n> \n> As Linus pointed out, that is \"all _locally_ matching revisions\".  It is \n> of dubious value in a distributed environment.\n\nRight.  Judging from some of the conversations on IRC (and even on this \nlist), it seems that the word \"local\" for the reflogs is lost on some, and \nthere is no reason to expect otherwise for the currently proposed thing.\n\nSo strike my suggestions,\nDscho\n"},{"id":"82957","messageId":"200807111539.06606.toralf.foerster@gmx.de","threadId":"14396","inReplyTo":"alpine.DEB.1.00.0807102028420.18205@racer","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Toralf Förster","fromEmail":"toralf.foerster@gmx.de","sentAt":"2008-07-11T13:39:04Z","receivedAt":"2008-07-11T13:39:04Z","isPatch":false,"sender":{"key":"toralf.foerster@gmx.de","avatar":null},"body":"At Thursday 10 July 2008 21:29:07 Johannes Schindelin wrote :\n> Hi,\n> \n> On Thu, 10 Jul 2008, Toralf Förster wrote:\n> \n> > I appended those strings to the names of my UML kernel executables. \n> > Unfortunately I didn't used the commit id and now I'm wondering whether \n> > git could accept v2.6.26-rc9-56 as well in future.\n> \n> If that were unambiguous, yes.  But it is not.\n> \n> Ciao,\n> Dscho\n> \n\nOk, following the thread I understand why this feature isn't wanted by all. But\nfor the given example (where I only pulled from another git tree) this could\nwork, isn't it : ?\n\ntfoerste@n22 ~/devel/linux-2.6 $ git-log v2.6.26-rc9.. | perl -e '@c = grep { /^commit/ } <>; print map { $#c - $i++ . \"\\t\" . $_ } @c'\n\n\n-- \nMfG/Sincerely\n\nToralf Förster\npgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3\n"},{"id":"82960","messageId":"alpine.DEB.1.00.0807111533310.8950@racer","threadId":"14396","inReplyTo":"200807111539.06606.toralf.foerster@gmx.de","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-11T14:36:07Z","receivedAt":"2008-07-11T14:36:07Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 11 Jul 2008, Toralf Förster wrote:\n\n> At Thursday 10 July 2008 21:29:07 Johannes Schindelin wrote :\n> \n> > On Thu, 10 Jul 2008, Toralf Förster wrote:\n> > \n> > > I appended those strings to the names of my UML kernel executables. \n> > > Unfortunately I didn't used the commit id and now I'm wondering \n> > > whether git could accept v2.6.26-rc9-56 as well in future.\n> > \n> > If that were unambiguous, yes.  But it is not.\n> \n> Ok, following the thread I understand why this feature isn't wanted by \n> all. But for the given example (where I only pulled from another git \n> tree) this could work, isn't it : ?\n> \n> tfoerste@n22 ~/devel/linux-2.6 $ git-log v2.6.26-rc9.. | perl -e '@c = grep { /^commit/ } <>; print map { $#c - $i++ . \"\\t\" . $_ } @c'\n\nThe question is not so much if it would work, but what people would do \nwith this.  They would probably include something in a mail to you like \n\"v2.6.26-rc9-111 stopped working!\", you would test \"v2.6.26-rc9-111\" and \ngo back \"but it still works!\".\n\nBecause you are talking about two different things.\n\nSo, in what workflow would v2.6.26-rc9-111 actually be helpful?  For \nyourself working in your own lil' branch?  I do not think so.  HEAD~23 is \nmuch more helpful in that case, since locally, you do not work so much \nrelative to a given tag, but relative to your current HEAD.\n\nHth,\nDscho\n"},{"id":"82961","messageId":"37fcd2780807110744k3b2a332csdf788dabd172622c@mail.gmail.com","threadId":"14396","inReplyTo":"200807111539.06606.toralf.foerster@gmx.de","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-07-11T14:44:23Z","receivedAt":"2008-07-11T14:44:23Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Fri, Jul 11, 2008 at 5:39 PM, Toralf Förster <toralf.foerster@gmx.de> wrote:\n>\n> Ok, following the thread I understand why this feature isn't wanted by all. But\n> for the given example (where I only pulled from another git tree) this could\n> work, isn't it : ?\n>\n> tfoerste@n22 ~/devel/linux-2.6 $ git-log v2.6.26-rc9.. | perl -e '@c = grep { /^commit/ } <>; print map { $#c - $i++ . \"\\t\" . $_ } @c'\n\nNo, it does not. Running your script, I have\n\n...\n56      commit 803a9067e19714ea7b7da760fe92f0d53bfa6994\n...\n\nNow, let's see what git-describe thinks about it\n$ git describe 803a9067e19714ea7b7da760fe92f0d53bfa6994\nv2.6.26-rc9-38-g803a906\n\nYour script is obviously incorrect. It is written in the assumption that\nhistory is linear, but it is not. Even if you pull only from one repo,\nthis repo still contains *many* branches. Along any branch, you may have\nthe same number.\n\nDmitry\n"},{"id":"82962","messageId":"200807111644.30486.toralf.foerster@gmx.de","threadId":"14396","inReplyTo":"alpine.DEB.1.00.0807111533310.8950@racer","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Toralf Förster","fromEmail":"toralf.foerster@gmx.de","sentAt":"2008-07-11T14:44:27Z","receivedAt":"2008-07-11T14:44:27Z","isPatch":false,"sender":{"key":"toralf.foerster@gmx.de","avatar":null},"body":"At Friday 11 July 2008 16:36:07 Johannes Schindelin wrote :\n\n> The question is not so much if it would work, but what people would do \n> with this.  They would probably include something in a mail to you like \n> \"v2.6.26-rc9-111 stopped working!\", you would test \"v2.6.26-rc9-111\" and \n> go back \"but it still works!\".\n> \n> Because you are talking about two different things.\n> \n> So, in what workflow would v2.6.26-rc9-111 actually be helpful?  For \n> yourself working in your own lil' branch?  I do not think so.  HEAD~23 is \n> much more helpful in that case, since locally, you do not work so much \n> relative to a given tag, but relative to your current HEAD.\n> \n> Hth,\n> Dscho\n\nAh yes, this clarified it for me.\n\n\n\n\n-- \nMfG/Sincerely\n\nToralf Förster\npgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3\n"},{"id":"82964","messageId":"200807111658.40626.toralf.foerster@gmx.de","threadId":"14396","inReplyTo":"37fcd2780807110744k3b2a332csdf788dabd172622c@mail.gmail.com","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Toralf Förster","fromEmail":"toralf.foerster@gmx.de","sentAt":"2008-07-11T14:58:40Z","receivedAt":"2008-07-11T14:58:40Z","isPatch":false,"sender":{"key":"toralf.foerster@gmx.de","avatar":null},"body":"At Friday 11 July 2008 16:44:23 Dmitry Potapov wrote :\n> On Fri, Jul 11, 2008 at 5:39 PM, Toralf Förster <toralf.foerster@gmx.de> wrote:\n> >\n> > Ok, following the thread I understand why this feature isn't wanted by all. But\n> > for the given example (where I only pulled from another git tree) this could\n> > work, isn't it : ?\n> >\n> > tfoerste@n22 ~/devel/linux-2.6 $ git-log v2.6.26-rc9.. | perl -e '@c = grep { /^commit/ } <>; print map { $#c - $i++ . \"\\t\" . $_ } @c'\n> \n> No, it does not. Running your script, I have\n> \n> ...\n> 56      commit 803a9067e19714ea7b7da760fe92f0d53bfa6994\n> ...\n> \n> Now, let's see what git-describe thinks about it\n> $ git describe 803a9067e19714ea7b7da760fe92f0d53bfa6994\n> v2.6.26-rc9-38-g803a906\n> \n> Your script is obviously incorrect. It is written in the assumption that\n> history is linear, but it is not. Even if you pull only from one repo,\n> this repo still contains *many* branches. Along any branch, you may have\n> the same number.\n> \n> Dmitry\n> \n\nYes,\n\n$> git-log v2.6.26-rc9.. --pretty=short | grep \"^commit\" | cut -f2 -d' ' | xargs -n 1 git describe | grep '\\-56\\-'\n\nI used eventually to get the commit id for the (broken) UML kernel 2.6.26-rc9-56\n\n-- \nMfG/Sincerely\n\nToralf Förster\npgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3\n"},{"id":"83000","messageId":"20080711192902.GD1721@dpotapov.dyndns.org","threadId":"14396","inReplyTo":"200807111658.40626.toralf.foerster@gmx.de","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-07-11T19:29:02Z","receivedAt":"2008-07-11T19:29:02Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Fri, Jul 11, 2008 at 04:58:40PM +0200, Toralf Förster wrote:\n> \n> $> git-log v2.6.26-rc9.. --pretty=short | grep \"^commit\" | cut -f2 -d' ' | xargs -n 1 git describe | grep '\\-56\\-'\n\nThe fastest way to do the same would be:\n\ngit rev-list v2.6.26-rc9.. | xargs git describe | grep '\\-56\\-'\n\n\nDmitry\n"},{"id":"83003","messageId":"alpine.DEB.1.00.0807112041470.8950@racer","threadId":"14396","inReplyTo":"20080711192902.GD1721@dpotapov.dyndns.org","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-11T19:57:13Z","receivedAt":"2008-07-11T19:57:13Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 11 Jul 2008, Dmitry Potapov wrote:\n\n> On Fri, Jul 11, 2008 at 04:58:40PM +0200, Toralf Förster wrote:\n> > \n> > $> git-log v2.6.26-rc9.. --pretty=short | grep \"^commit\" | cut -f2 -d' ' | xargs -n 1 git describe | grep '\\-56\\-'\n> \n> The fastest way to do the same would be:\n> \n> git rev-list v2.6.26-rc9.. | xargs git describe | grep '\\-56\\-'\n\nYou forgot the \"--all\" option to rev-list.\n\nAnd I doubt it would be the \"fastest\" way, in terms of execution speed.\n\nAlso, it leaves out this case:\n\nrc9 - A - B - C - D - F\n    \\               /\n      ----- E -----\n\nF would be \"rc9-5\", but also \"rc9-2\".\n\nOh, and this would leave out reflogs, too.\n\nCan we please let this concept die now?\n\nHth,\nDscho\n"},{"id":"83008","messageId":"alpine.DEB.1.00.0807112129290.8950@racer","threadId":"14396","inReplyTo":"alpine.DEB.1.00.0807112041470.8950@racer","subject":"Re: feature request: git-log should accept sth like v2.6.26-rc8-227","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-11T20:35:29Z","receivedAt":"2008-07-11T20:35:29Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 11 Jul 2008, Johannes Schindelin wrote:\n\n> On Fri, 11 Jul 2008, Dmitry Potapov wrote:\n> \n> > On Fri, Jul 11, 2008 at 04:58:40PM +0200, Toralf Förster wrote:\n> > > \n> > > $> git-log v2.6.26-rc9.. --pretty=short | grep \"^commit\" | cut -f2 -d' ' | xargs -n 1 git describe | grep '\\-56\\-'\n> > \n> > The fastest way to do the same would be:\n> > \n> > git rev-list v2.6.26-rc9.. | xargs git describe | grep '\\-56\\-'\n> \n> You forgot the \"--all\" option to rev-list.\n> \n> And I doubt it would be the \"fastest\" way, in terms of execution speed.\n> \n> Also, it leaves out this case:\n> \n> rc9 - A - B - C - D - F\n>     \\               /\n>       ----- E -----\n> \n> F would be \"rc9-5\", but also \"rc9-2\".\n> \n> Oh, and this would leave out reflogs, too.\n> \n> Can we please let this concept die now?\n\nHeh, just as an intellectual exercise, I could not resist trying to brush \nup my l33t py7h0n sk1llz (and I am sure somebody will teach me something \nuseful again):\n\n-- snipsnap --\n#!/usr/bin/python\n\nimport os\nimport sys\n\nif len(sys.argv) != 2:\n\tprint 'Usage:', sys.argv[0], '<pseudo-describe>'\n\n# split argument\ndash = sys.argv[1].rindex('-')\ntag = sys.argv[1][0:dash]\ngeneration = int(sys.argv[1][dash + 1:])\n\n# get sha1 of given tag's commit\npipe = os.popen('git rev-parse ' + tag + '^{commit}')\nsha1 = pipe.readlines()[0].strip()\npipe.close()\n\n# 'number' will contain (positive) distance to given commit\nnumber = dict()\nnumber[sha1] = set()\nnumber[sha1].add(0)\n\npipe = os.popen('git rev-list ^' + sha1 + ' --all --parents')\nrev_list = pipe.readlines()\npipe.close()\n\nrev_list.reverse()\nfor line in rev_list:\n\tlist = line.strip().split(' ')\n\tnumber[list[0]] = set()\n\tfor parent in list[1:]:\n\t\tif parent in number:\n\t\t\tfor n in number[parent]:\n\t\t\t\tnumber[list[0]].add(n + 1)\n\tfor n in number[list[0]]:\n\t\tif n == generation:\n\t\t\tprint list[0]"}]}