{"thread":{"id":"31471","subject":"[BUG?] git rebase not accepting :/ syntax","startedAt":"2012-09-07T13:08:03Z","lastAt":"2012-09-10T16:19:31Z","messageCount":5,"participants":["Yann Dirson","Andreas Schwab","Joachim Schmitz","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"198522","messageId":"20120907150803.0ae2b186@chalon.bertin.fr","threadId":"31471","inReplyTo":null,"subject":"[BUG?] git rebase not accepting :/ syntax","fromName":"Yann Dirson","fromEmail":"dirson@bertin.fr","sentAt":"2012-09-07T13:08:03Z","receivedAt":"2012-09-07T13:08:03Z","isPatch":false,"sender":{"key":"dirson@bertin.fr","avatar":null},"body":"In 1.7.10.3, \"git rebase -i :/Merge\" will complain with:\n\nfatal: Needed a single revision\ninvalid upstream :/Merge\n\n... whereas \"git rev-parse :/Merge\" has no problem resolving\nto a single revision.  OTOH, \"git rebase -i HEAD^{/Merge}\" does\nwork, and rev-parse resolves it to the same commit.\n\nIs that due in some way to the semantic differences between the two\nrevspecs, or is that just a bug ?\n-- \nYann Dirson - Bertin Technologies\n"},{"id":"198524","messageId":"m2ipbqx7iu.fsf@igel.home","threadId":"31471","inReplyTo":"20120907150803.0ae2b186@chalon.bertin.fr","subject":"Re: [BUG?] git rebase not accepting :/ syntax","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2012-09-07T13:54:49Z","receivedAt":"2012-09-07T13:54:49Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Yann Dirson <dirson@bertin.fr> writes:\n\n> In 1.7.10.3, \"git rebase -i :/Merge\" will complain with:\n>\n> fatal: Needed a single revision\n> invalid upstream :/Merge\n>\n> ... whereas \"git rev-parse :/Merge\" has no problem resolving\n> to a single revision.\n\ngit rebase actually calls \"git rev-parse :/Merge^0\", which due to the\nunlimited nature of :/ doesn't work.\n\n> OTOH, \"git rebase -i HEAD^{/Merge}\" does work, and rev-parse resolves\n> it to the same commit.\n\nOTOH, \"git rev-parse HEAD^{/Merge}^0\" works as expected.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"198660","messageId":"20120910091224.4eca1b6e@chalon.bertin.fr","threadId":"31471","inReplyTo":"m2ipbqx7iu.fsf@igel.home","subject":"Re: [BUG?] git rebase not accepting :/ syntax","fromName":"Yann Dirson","fromEmail":"dirson@bertin.fr","sentAt":"2012-09-10T07:12:24Z","receivedAt":"2012-09-10T07:12:24Z","isPatch":false,"sender":{"key":"dirson@bertin.fr","avatar":null},"body":"On Fri, 07 Sep 2012 15:54:49 +0200\nAndreas Schwab <schwab@linux-m68k.org> wrote:\n\n> Yann Dirson <dirson@bertin.fr> writes:\n> \n> > In 1.7.10.3, \"git rebase -i :/Merge\" will complain with:\n> >\n> > fatal: Needed a single revision\n> > invalid upstream :/Merge\n> >\n> > ... whereas \"git rev-parse :/Merge\" has no problem resolving\n> > to a single revision.\n> \n> git rebase actually calls \"git rev-parse :/Merge^0\", which due to the\n> unlimited nature of :/ doesn't work.\n\nHm.  But then, git rev-parse $(git rev-parse :/Merge}^0 does work, a trivial\npatch would appear to make things better.\n\nBTW, git-rebase.sh seems to be quite inconsistent on the use of $() vs. ``,\nnot to mention the clear preference stated in CodingGuidelines.\n\nI guess I'll find a moment for a couple of patches...\n\n> > OTOH, \"git rebase -i HEAD^{/Merge}\" does work, and rev-parse resolves\n> > it to the same commit.\n> \n> OTOH, \"git rev-parse HEAD^{/Merge}^0\" works as expected.\n> \n> Andreas.\n> \n\n\n-- \nYann Dirson - Bertin Technologies\n"},{"id":"198661","messageId":"k2k8dt$i5v$1@ger.gmane.org","threadId":"31471","inReplyTo":"20120910091224.4eca1b6e@chalon.bertin.fr","subject":"Re: [BUG?] git rebase not accepting :/ syntax","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2012-09-10T08:29:48Z","receivedAt":"2012-09-10T08:29:48Z","isPatch":false,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"Yann Dirson wrote:\n> On Fri, 07 Sep 2012 15:54:49 +0200\n...\n> BTW, git-rebase.sh seems to be quite inconsistent on the use of $()\n> vs. ``, not to mention the clear preference stated in\n> CodingGuidelines.\n\nThere are still quite a few more places in *.sh where `cmd`is used instead \nof $(cmd):\n\ncheck-builtins.sh, git-am.sh, git-merge-one-file.sh, git-pull.sh, \ngit-rebase--merge.sh, git-repack.sh, git-stash.sh, \ngit-web--browse.sh,test-sha1.sh, unimplemented.sh\n\n> I guess I'll find a moment for a couple of patches...\n\nMight wanna fix them all in one go?\n\nBye, Jojo \n"},{"id":"198684","messageId":"7v8vchq298.fsf@alter.siamese.dyndns.org","threadId":"31471","inReplyTo":"20120910091224.4eca1b6e@chalon.bertin.fr","subject":"Re: [BUG?] git rebase not accepting :/ syntax","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-10T16:19:31Z","receivedAt":"2012-09-10T16:19:31Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Yann Dirson <dirson@bertin.fr> writes:\n\n> Hm.  But then, git rev-parse $(git rev-parse :/Merge}^0 does work, a trivial\n> patch would appear to make things better.\n\nThat, if done unconditionally, smells like a bad hack that wastes an\nextra fork for a corner case that appears only very rarely.\n\nI guess something like this\n\n\tupstream=$(\n        \tgit rev-parse --verify -q \"$upstream_name\"^0 ||\n                git rev-parse --verify -q $(git rev-parse --verify \"$upstream_name\")^0\n\t) ||\n\tdie \"$(eval_gettext 'invalid upstream $upstream_name')\"\n\nmay be an acceptable usability workaround, but I wonder if we can do\nthe same fallback inside the revision argument parser, so that\n\n\tgit <cmd> \":/Merge^0\"\n\nfirst looks for a commit that has string \"Merge^0\" in it and if it\nfails then it looks for a commit that has string \"Merge\" and then\napply \"^0\" to it.\n"}]}