From: Erik Faye-Lund <kusmabite@gmail.com>
To: manuelah@opera.com
Cc: git@vger.kernel.org
Subject: Re: calling git rebase with invalid onto-ref exits with wrong error message
Date: Wed, 30 May 2012 11:27:02 +0200 [thread overview]
Message-ID: <CABPQNSZntbPQ7taPhr_QUNnwzOcexjteUsnpmrkCiRUYRA3nvA@mail.gmail.com> (raw)
In-Reply-To: <op.we351rjtt21y7h@id-c1003.oslo.osa>
On Wed, May 30, 2012 at 11:02 AM, Manuela Hutter <manuelah@opera.com> wrote:
> Just noticed a small bug (in git version 1.7.10.msysgit.1):
>
> calling
> git rebase --onto <onto-ref> <base-ref> <branch-ref>
>
> with an unknown <onto-ref> reports:
> fatal: Needed a single revision
> Does not point to a valid commit: <branch-ref>
>
> Expected:
> fatal: Needed a single revision
> Does not point to a valid commit: <onto-ref>
>
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
next prev parent reply other threads:[~2012-05-30 9:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 9:02 calling git rebase with invalid onto-ref exits with wrong error message Manuela Hutter
2012-05-30 9:27 ` Erik Faye-Lund [this message]
2012-05-30 15:37 ` Junio C Hamano
2012-05-30 16:39 ` [PATCH] rebase: report invalid commit correctly Erik Faye-Lund
2012-05-30 21:11 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABPQNSZntbPQ7taPhr_QUNnwzOcexjteUsnpmrkCiRUYRA3nvA@mail.gmail.com \
--to=kusmabite@gmail.com \
--cc=git@vger.kernel.org \
--cc=manuelah@opera.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).