Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-04-25 10:41:13 +0300
committerJunio C Hamano <gitster@pobox.com>2019-04-25 10:41:14 +0300
commitd2dba18ced8e4939a3cd135998c54874ce73adc1 (patch)
tree471a1a30c2d3d5c70f7b8ec46ea93cbab3dfc0a8 /t
parente313c768e0daf78da2d9e23967dc6625e9db0837 (diff)
parent6860ce5d8e461e5997029abe73c39590d349cef9 (diff)
Merge branch 'pw/cherry-pick-continue'
"git cherry-pick --options A..B", after giving control back to the user to ask help resolving a conflicted step, did not honor the options it originally received, which has been corrected. * pw/cherry-pick-continue: cherry-pick --continue: remember options cherry-pick: demonstrate option amnesia sequencer: break some long lines
Diffstat (limited to 't')
-rwxr-xr-xt/t3507-cherry-pick-conflict.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh
index 0db166152a..1ef8e9d534 100755
--- a/t/t3507-cherry-pick-conflict.sh
+++ b/t/t3507-cherry-pick-conflict.sh
@@ -25,6 +25,11 @@ test_expect_success setup '
test_commit base foo b &&
test_commit picked foo c &&
test_commit --signoff picked-signed foo d &&
+ git checkout -b topic initial &&
+ test_commit redundant-pick foo c redundant &&
+ git commit --allow-empty --allow-empty-message &&
+ git tag empty &&
+ git checkout master &&
git config advice.detachedhead false
'
@@ -405,4 +410,23 @@ test_expect_success 'cherry-pick preserves sparse-checkout' '
test_i18ngrep ! "Changes not staged for commit:" actual
'
+test_expect_success 'cherry-pick --continue remembers --keep-redundant-commits' '
+ test_when_finished "git cherry-pick --abort || :" &&
+ pristine_detach initial &&
+ test_must_fail git cherry-pick --keep-redundant-commits picked redundant &&
+ echo c >foo &&
+ git add foo &&
+ git cherry-pick --continue
+'
+
+test_expect_success 'cherry-pick --continue remembers --allow-empty and --allow-empty-message' '
+ test_when_finished "git cherry-pick --abort || :" &&
+ pristine_detach initial &&
+ test_must_fail git cherry-pick --allow-empty --allow-empty-message \
+ picked empty &&
+ echo c >foo &&
+ git add foo &&
+ git cherry-pick --continue
+'
+
test_done