From: Erik Faye-Lund Date: Wed, 30 May 2012 09:27:02 GMT Subject: Re: calling git rebase with invalid onto-ref exits with wrong error message Message-ID: In-Reply-To: On Wed, May 30, 2012 at 11:02 AM, Manuela Hutter wrote: > Just noticed a small bug (in git version 1.7.10.msysgit.1): > > calling >   git rebase --onto > > with an unknown reports: >   fatal: Needed a single revision >   Does not point to a valid commit: > > Expected: >   fatal: Needed a single revision >   Does not point to a valid commit: > Indeed. This looks like the result of a bad merge-resolution, but I could be mistaken. 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