summaryrefslogtreecommitdiff
path: root/t/t3406-rebase-message.sh
diff options
context:
space:
mode:
authorErik Faye-Lund <kusmabite@gmail.com>2012-05-30 16:39:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-05-30 18:59:08 (GMT)
commit9180feafbc7c637a4fae72d1ca1d3b2245b4302c (patch)
tree8975a43b9afb82e8a9821413500c6523214c4425 /t/t3406-rebase-message.sh
parent71786f54c4128821eab8a23f258848c76b5a2071 (diff)
downloadgit-9180feafbc7c637a4fae72d1ca1d3b2245b4302c.zip
git-9180feafbc7c637a4fae72d1ca1d3b2245b4302c.tar.gz
git-9180feafbc7c637a4fae72d1ca1d3b2245b4302c.tar.bz2
rebase: report invalid commit correctly
In 9765b6a (rebase: align variable content, 2011-02-06), the code to error out was moved up one level. Unfortunately, one reference to a function parameter wasn't rewritten as it should, leading to the wrong parameter being errored on. This error was propagated by 71786f5 (rebase: factor out reference parsing, 2011-02-06) and merged in 78c6e0f (Merge branch 'mz/rebase', 2011-04-28). Correct this by reporting $onto_name istead. Reported-By: Manuela Hutter <manuelah@opera.com> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3406-rebase-message.sh')
-rwxr-xr-xt/t3406-rebase-message.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh
index fe5f936..6898377 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