Code

t3508 (cherry-pick): futureproof against unmerged files
[git.git] / t / t3508-cherry-pick-many-commits.sh
index 3b87efe3adffc025275ff5ad5ee4cd8251a39522..26a873032d7942f6696f9dbef3c14299d5186bac 100755 (executable)
@@ -23,7 +23,7 @@ test_expect_success setup '
 '
 
 test_expect_success 'cherry-pick first..fourth works' '
-       git checkout master &&
+       git checkout -f master &&
        git reset --hard first &&
        test_tick &&
        git cherry-pick first..fourth &&
@@ -33,7 +33,7 @@ test_expect_success 'cherry-pick first..fourth works' '
 '
 
 test_expect_success 'cherry-pick --ff first..fourth works' '
-       git checkout master &&
+       git checkout -f master &&
        git reset --hard first &&
        test_tick &&
        git cherry-pick --ff first..fourth &&
@@ -43,7 +43,7 @@ test_expect_success 'cherry-pick --ff first..fourth works' '
 '
 
 test_expect_success 'cherry-pick -n first..fourth works' '
-       git checkout master &&
+       git checkout -f master &&
        git reset --hard first &&
        test_tick &&
        git cherry-pick -n first..fourth &&
@@ -53,7 +53,7 @@ test_expect_success 'cherry-pick -n first..fourth works' '
 '
 
 test_expect_success 'revert first..fourth works' '
-       git checkout master &&
+       git checkout -f master &&
        git reset --hard fourth &&
        test_tick &&
        git revert first..fourth &&
@@ -63,7 +63,7 @@ test_expect_success 'revert first..fourth works' '
 '
 
 test_expect_success 'revert ^first fourth works' '
-       git checkout master &&
+       git checkout -f master &&
        git reset --hard fourth &&
        test_tick &&
        git revert ^first fourth &&
@@ -73,7 +73,7 @@ test_expect_success 'revert ^first fourth works' '
 '
 
 test_expect_success 'revert fourth fourth~1 fourth~2 works' '
-       git checkout master &&
+       git checkout -f master &&
        git reset --hard fourth &&
        test_tick &&
        git revert fourth fourth~1 fourth~2 &&
@@ -83,7 +83,7 @@ test_expect_success 'revert fourth fourth~1 fourth~2 works' '
 '
 
 test_expect_failure 'cherry-pick -3 fourth works' '
-       git checkout master &&
+       git checkout -f master &&
        git reset --hard first &&
        test_tick &&
        git cherry-pick -3 fourth &&