summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 86c7bb4)
raw | patch | inline | side by side (parent: 86c7bb4)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Mon, 14 Jun 2010 05:28:50 +0000 (00:28 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 14 Jun 2010 17:32:02 +0000 (10:32 -0700) |
Each of the tests in t3508 begins by navigating to a sane state:
git checkout master &&
git reset --hard $commit
If a previous test left unmerged files around, they are untouched and
the checkout fails, causing later tests to fail, too. This is not a
problem in practice because no test except the final one produces
unmerged files.
But as a futureproofing measure, it is still best to avoid the problem
with 'checkout -f'. In particular, this is needed for new tests to be
added to the end of the script.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git checkout master &&
git reset --hard $commit
If a previous test left unmerged files around, they are untouched and
the checkout fails, causing later tests to fail, too. This is not a
problem in practice because no test except the final one produces
unmerged files.
But as a futureproofing measure, it is still best to avoid the problem
with 'checkout -f'. In particular, this is needed for new tests to be
added to the end of the script.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3508-cherry-pick-many-commits.sh | patch | blob | history |
index 3b87efe3adffc025275ff5ad5ee4cd8251a39522..26a873032d7942f6696f9dbef3c14299d5186bac 100755 (executable)
'
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 &&
'
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 &&
'
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 &&
'
test_expect_success 'revert first..fourth works' '
- git checkout master &&
+ git checkout -f master &&
git reset --hard fourth &&
test_tick &&
git revert first..fourth &&
'
test_expect_success 'revert ^first fourth works' '
- git checkout master &&
+ git checkout -f master &&
git reset --hard fourth &&
test_tick &&
git revert ^first fourth &&
'
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 &&
'
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 &&