{"thread":{"id":"24113","subject":"[PATCH v2 1/3] t3508 (cherry-pick): futureproof against unmerged files","startedAt":"2010-06-15T03:29:49Z","lastAt":"2010-06-15T03:29:49Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":2,"patchTotal":3},"messages":[{"id":"143715","messageId":"20100615032952.3977.85581.chriscool@tuxfamily.org","threadId":"24113","inReplyTo":null,"subject":"[PATCH v2 1/3] t3508 (cherry-pick): futureproof against unmerged files","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2010-06-15T03:29:49Z","receivedAt":"2010-06-15T03:29:49Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"From: Jonathan Nieder <jrnieder@gmail.com>\n\nEach of the tests in t3508 begins by navigating to a sane state:\n\n\tgit checkout master &&\n\tgit reset --hard $commit\n\nIf a previous test left unmerged files around, they are untouched and\nthe checkout fails, causing later tests to fail, too.  This is not a\nproblem in practice because no test except the final one produces\nunmerged files.\n\nBut as a futureproofing measure, it is still best to avoid the problem\nwith 'checkout -f'.  In particular, this is needed for new tests to be\nadded to the end of the script.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/t3508-cherry-pick-many-commits.sh |   14 +++++++-------\n 1 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh\nindex 3b87efe..26a8730 100755\n--- a/t/t3508-cherry-pick-many-commits.sh\n+++ b/t/t3508-cherry-pick-many-commits.sh\n@@ -23,7 +23,7 @@ test_expect_success setup '\n '\n \n test_expect_success 'cherry-pick first..fourth works' '\n-\tgit checkout master &&\n+\tgit checkout -f master &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick first..fourth &&\n@@ -33,7 +33,7 @@ test_expect_success 'cherry-pick first..fourth works' '\n '\n \n test_expect_success 'cherry-pick --ff first..fourth works' '\n-\tgit checkout master &&\n+\tgit checkout -f master &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick --ff first..fourth &&\n@@ -43,7 +43,7 @@ test_expect_success 'cherry-pick --ff first..fourth works' '\n '\n \n test_expect_success 'cherry-pick -n first..fourth works' '\n-\tgit checkout master &&\n+\tgit checkout -f master &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick -n first..fourth &&\n@@ -53,7 +53,7 @@ test_expect_success 'cherry-pick -n first..fourth works' '\n '\n \n test_expect_success 'revert first..fourth works' '\n-\tgit checkout master &&\n+\tgit checkout -f master &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert first..fourth &&\n@@ -63,7 +63,7 @@ test_expect_success 'revert first..fourth works' '\n '\n \n test_expect_success 'revert ^first fourth works' '\n-\tgit checkout master &&\n+\tgit checkout -f master &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert ^first fourth &&\n@@ -73,7 +73,7 @@ test_expect_success 'revert ^first fourth works' '\n '\n \n test_expect_success 'revert fourth fourth~1 fourth~2 works' '\n-\tgit checkout master &&\n+\tgit checkout -f master &&\n \tgit reset --hard fourth &&\n \ttest_tick &&\n \tgit revert fourth fourth~1 fourth~2 &&\n@@ -83,7 +83,7 @@ test_expect_success 'revert fourth fourth~1 fourth~2 works' '\n '\n \n test_expect_failure 'cherry-pick -3 fourth works' '\n-\tgit checkout master &&\n+\tgit checkout -f master &&\n \tgit reset --hard first &&\n \ttest_tick &&\n \tgit cherry-pick -3 fourth &&\n-- \n1.7.1.530.g14dc.dirty\n"}]}