mirror of
https://github.com/git/git
synced 2024-10-28 19:25:47 +00:00
t3510: test that cherry-pick --abort does not unsafely change HEAD
Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
1868331f13
commit
aeebd98ebe
1 changed files with 10 additions and 0 deletions
|
@ -147,6 +147,16 @@ test_expect_success '--abort to cancel single cherry-pick' '
|
|||
git diff-index --exit-code HEAD
|
||||
'
|
||||
|
||||
test_expect_failure '--abort does not unsafely change HEAD' '
|
||||
pristine_detach initial &&
|
||||
test_must_fail git cherry-pick picked anotherpick &&
|
||||
git reset --hard base &&
|
||||
test_must_fail git cherry-pick picked anotherpick &&
|
||||
git cherry-pick --abort 2>actual &&
|
||||
test_i18ngrep "You seem to have moved HEAD" actual &&
|
||||
test_cmp_rev base HEAD
|
||||
'
|
||||
|
||||
test_expect_success 'cherry-pick --abort to cancel multiple revert' '
|
||||
pristine_detach anotherpick &&
|
||||
test_expect_code 1 git revert base..picked &&
|
||||
|
|
Loading…
Reference in a new issue