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

Re: calling git rebase with invalid onto-ref exits with wrong error message

From
Junio C Hamano <gitster@pobox.com>
Date
May 30, 2012, 15:37 UTC
Message-ID
<7v7gvt1xz6.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CABPQNSZntbPQ7taPhr_QUNnwzOcexjteUsnpmrkCiRUYRA3nvA@mail.gmail.com>
Erik Faye-Lund <kusmabite@gmail.com> writes:
> Indeed. This looks like the result of a bad merge-resolution, but I
> could be mistaken.

It looks like 9765b6a (rebase: align variable content, 2011-02-06) originally botched it, which propagated to 71786f5 (rebase: factor out reference parsing, 2011-02-06) in the series, and finally merged at 78c6e0f (Merge branch 'mz/rebase', 2011-04-28).

Show 14 quoted lines
> This looks like the correct solution to me:
>
> diff --git a/git-rebase.sh b/git-rebase.sh
> index 24a2840..3267c92 100755
> --- a/git-rebase.sh
> +++ b/git-rebase.sh
> @@ -423,7 +423,7 @@ case "$onto_name" in
>  	;;
>  *)
>  	onto=$(git rev-parse --verify "${onto_name}^0") ||
> -	die "Does not point to a valid commit: $1"
> +	die "Does not point to a valid commit: $onto_name"
>  	;;
>  esac
Yes, it does.
Previous: Erik Faye-LundNext: Erik Faye-Lund
Message 3 of 5 in “calling git rebase with invalid onto-ref exits with wrong error message”
  1. Manuela HutterMay 30, 2012
  2. Erik Faye-LundMay 30, 2012
  3. Junio C HamanoMay 30, 2012
  4. rebase: report invalid commit correctlyErik Faye-Lund, May 30, 2012
  5. Junio C HamanoMay 30, 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.