3 test_description='Merge-recursive ours and theirs variants'
6 test_expect_success setup '
7 for i in 1 2 3 4 5 6 7 8 9
13 git commit -m initial &&
15 sed -e "s/1/one/" -e "s/9/nine/" >file <elif &&
16 git commit -a -m ours &&
18 git checkout -b side HEAD^ &&
20 sed -e "s/9/nueve/" >file <elif &&
21 git commit -a -m theirs &&
26 test_expect_success 'plain recursive - should conflict' '
27 git reset --hard master &&
28 test_must_fail git merge -s recursive side &&
36 test_expect_success 'recursive favouring theirs' '
37 git reset --hard master &&
38 git merge -s recursive -Xtheirs side &&
46 test_expect_success 'recursive favouring ours' '
47 git reset --hard master &&
48 git merge -s recursive -X ours side &&
56 test_expect_success 'pull with -X' '
57 git reset --hard master && git pull -s recursive -Xours . side &&
58 git reset --hard master && git pull -s recursive -X ours . side &&
59 git reset --hard master && git pull -s recursive -Xtheirs . side &&
60 git reset --hard master && git pull -s recursive -X theirs . side &&
61 git reset --hard master && ! git pull -s recursive -X bork . side