3 test_description
='test cherry-picking (and reverting) a root commit'
7 test_expect_success setup
'
12 git commit -m "first" &&
14 git symbolic-ref HEAD refs/heads/second &&
15 rm .git/index file1 &&
16 echo second > file2 &&
19 git commit -m "second"
23 test_expect_success
'cherry-pick a root commit' '
25 git cherry-pick master &&
31 test_expect_success
'revert a root commit' '
34 test_path_is_missing file1
38 test_expect_success
'cherry-pick a root commit with an external strategy' '
40 git cherry-pick --strategy=resolve master &&
46 test_expect_success
'revert a root commit with an external strategy' '
48 git revert --strategy=resolve master &&
49 test_path_is_missing file1