From: Junio C Hamano Date: Mon, 10 Sep 2012 16:19:31 GMT Subject: Re: [BUG?] git rebase not accepting :/ syntax Message-ID: <7v8vchq298.fsf@alter.siamese.dyndns.org> In-Reply-To: <20120910091224.4eca1b6e@chalon.bertin.fr> Yann Dirson writes: > Hm. But then, git rev-parse $(git rev-parse :/Merge}^0 does work, a trivial > patch would appear to make things better. That, if done unconditionally, smells like a bad hack that wastes an extra fork for a corner case that appears only very rarely. I guess something like this upstream=$( git rev-parse --verify -q "$upstream_name"^0 || git rev-parse --verify -q $(git rev-parse --verify "$upstream_name")^0 ) || die "$(eval_gettext 'invalid upstream $upstream_name')" may be an acceptable usability workaround, but I wonder if we can do the same fallback inside the revision argument parser, so that git ":/Merge^0" first looks for a commit that has string "Merge^0" in it and if it fails then it looks for a commit that has string "Merge" and then apply "^0" to it.