diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:39 +0000 |
commit | 7260c37aa8c91c8008dcd2442a19c23d1c9040fb (patch) | |
tree | 83953428f11212a71a4616e535c1053076f9bb94 /t/t3510-cherry-pick-sequence.sh | |
parent | Releasing progress-linux version 1:2.43.0-1~progress7.99u1. (diff) | |
download | git-7260c37aa8c91c8008dcd2442a19c23d1c9040fb.tar.xz git-7260c37aa8c91c8008dcd2442a19c23d1c9040fb.zip |
Merging upstream version 1:2.45.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/t3510-cherry-pick-sequence.sh')
-rwxr-xr-x | t/t3510-cherry-pick-sequence.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/t/t3510-cherry-pick-sequence.sh b/t/t3510-cherry-pick-sequence.sh index 72020a5..7eb52b1 100755 --- a/t/t3510-cherry-pick-sequence.sh +++ b/t/t3510-cherry-pick-sequence.sh @@ -90,6 +90,38 @@ test_expect_success 'cherry-pick persists opts correctly' ' test_cmp expect actual ' +test_expect_success 'cherry-pick persists --empty=stop correctly' ' + pristine_detach yetanotherpick && + # Picking `anotherpick` forces a conflict so that we stop. That + # commit is then skipped, after which we pick `yetanotherpick` + # while already on `yetanotherpick` to cause an empty commit + test_must_fail git cherry-pick --empty=stop anotherpick yetanotherpick && + test_must_fail git cherry-pick --skip 2>msg && + test_grep "The previous cherry-pick is now empty" msg && + rm msg && + git cherry-pick --abort +' + +test_expect_success 'cherry-pick persists --empty=drop correctly' ' + pristine_detach yetanotherpick && + # Picking `anotherpick` forces a conflict so that we stop. That + # commit is then skipped, after which we pick `yetanotherpick` + # while already on `yetanotherpick` to cause an empty commit + test_must_fail git cherry-pick --empty=drop anotherpick yetanotherpick && + git cherry-pick --skip && + test_cmp_rev yetanotherpick HEAD +' + +test_expect_success 'cherry-pick persists --empty=keep correctly' ' + pristine_detach yetanotherpick && + # Picking `anotherpick` forces a conflict so that we stop. That + # commit is then skipped, after which we pick `yetanotherpick` + # while already on `yetanotherpick` to cause an empty commit + test_must_fail git cherry-pick --empty=keep anotherpick yetanotherpick && + git cherry-pick --skip && + test_cmp_rev yetanotherpick HEAD^ +' + test_expect_success 'revert persists opts correctly' ' pristine_detach initial && # to make sure that the session to revert a sequence |