Merge branch 'sn/complete-bash-wo-process-subst'
[gitweb.git] / t / t3507-cherry-pick-conflict.sh
index 212ec54aaf0d805bbdecd93f3311d248a57d5b08..cb45574a7b5cbdf6da58f609befc4a0bb396db2f 100755 (executable)
@@ -77,6 +77,21 @@ test_expect_success 'cherry-pick --no-commit does not set CHERRY_PICK_HEAD' '
        test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
 '
 
+test_expect_success 'cherry-pick w/dirty tree does not set CHERRY_PICK_HEAD' '
+       pristine_detach initial &&
+       echo foo > foo &&
+       test_must_fail git cherry-pick base &&
+       test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
+'
+
+test_expect_success \
+       'cherry-pick --strategy=resolve w/dirty tree does not set CHERRY_PICK_HEAD' '
+       pristine_detach initial &&
+       echo foo > foo &&
+       test_must_fail git cherry-pick --strategy=resolve base &&
+       test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
+'
+
 test_expect_success 'GIT_CHERRY_PICK_HELP suppresses CHERRY_PICK_HEAD' '
        pristine_detach initial &&
        (