diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-06-03 15:52:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-06-03 15:52:18 -0700 |
commit | 06de561830250f92e056b0a57bc52b27b13ba2ac (patch) | |
tree | 30f565b258771ba9cffeeaa04a0c02c755cf28e2 | |
parent | 6a6d72b199fda7189b772640ca35ceb13708332d (diff) | |
parent | 9180feafbc7c637a4fae72d1ca1d3b2245b4302c (diff) | |
download | git-06de561830250f92e056b0a57bc52b27b13ba2ac.tar.gz git-06de561830250f92e056b0a57bc52b27b13ba2ac.tar.xz |
Merge branch 'ef/maint-rebase-error-message' into maint
When "git rebase" was given a bad commit to replay the history on,
its error message did not correctly give the command line argument
it had trouble parsing.
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 69c137482..03f73da88 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -418,7 +418,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 fe5f93698..689837791 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 |