Skip to content

Commit

Permalink
Merge branch 'ef/maint-rebase-error-message'
Browse files Browse the repository at this point in the history
By Erik Faye-Lund
* ef/maint-rebase-error-message:
  rebase: report invalid commit correctly
  • Loading branch information
gitster committed Jun 1, 2012
2 parents 264d5a7 + 9180fea commit 3ba4663
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion git-rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions t/t3406-rebase-message.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3ba4663

Please sign in to comment.