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
This commit is contained in:
commit
06de561830
@ -418,7 +418,7 @@ case "$onto_name" in
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
onto=$(git rev-parse --verify "${onto_name}^0") ||
|
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
|
esac
|
||||||
|
|
||||||
|
@ -62,4 +62,9 @@ test_expect_success 'rebase -n overrides config rebase.stat config' '
|
|||||||
! grep "^ fileX | *1 +$" diffstat.txt
|
! 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
|
test_done
|
||||||
|
Loading…
Reference in New Issue
Block a user