git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG?] git rebase not accepting :/ syntax

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 10, 2012, 16:19 UTC
Message-ID
<7v8vchq298.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120910091224.4eca1b6e@chalon.bertin.fr>
Yann Dirson <dirson@bertin.fr> 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 <cmd> ":/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.

Previous: Joachim Schmitz
Message 5 of 5 in “[BUG?] git rebase not accepting :/ syntax”
  1. Yann DirsonSep 7, 2012
  2. Andreas SchwabSep 7, 2012
  3. Yann DirsonSep 10, 2012
  4. Joachim SchmitzSep 10, 2012
  5. Junio C HamanoSep 10, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.