diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-06-01 13:28:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-06-01 13:28:25 -0700 |
commit | 3ba46634202968045e05e4d7f969d97c61efa53d (patch) | |
tree | 38e71726997c2161a44016af1407bf182cb625a9 | |
parent | 264d5a717bb450ae06969face25c70b000e1358f (diff) | |
parent | 9180feafbc7c637a4fae72d1ca1d3b2245b4302c (diff) | |
download | git-3ba46634202968045e05e4d7f969d97c61efa53d.tar.gz |
Merge branch 'ef/maint-rebase-error-message'
By Erik Faye-Lund
* ef/maint-rebase-error-message:
rebase: report invalid commit correctly
-rwxr-xr-x | git-rebase.sh | 2 | ||||
-rwxr-xr-x | t/t3406-rebase-message.sh | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/git-rebase.sh b/git-rebase.sh index 9148ec25c1..e616737444 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -424,7 +424,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 diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh index fe5f936988..6898377910 100755 --- a/t/t3406-rebase-message.sh +++ b/t/t3406-rebase-message.sh @@ -62,4 +62,9 @@ test_expect_success 'rebase -n overrides config rebase.stat config' ' ! grep "^ fileX | *1 +$" diffstat.txt ' +test_expect_success 'rebase --onto outputs the invalid ref' ' + test_must_fail git rebase --onto invalid-ref HEAD HEAD 2>err && + grep "invalid-ref" err +' + test_done |