3 test_description='ask merge-recursive to merge binary files'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
10 test_expect_success setup '
12 cat "$TEST_DIRECTORY"/test-binary-1.png >m &&
14 git ls-files -s | sed -e "s/ 0 / 1 /" >E1 &&
16 git commit -m "initial" &&
23 git ls-files -s a >E0 &&
24 git ls-files -s m | sed -e "s/ 0 / 3 /" >E3 &&
26 git commit -m "main adds some" &&
31 git ls-files -s m | sed -e "s/ 0 / 2 /" >E2 &&
33 git commit -m "side modifies" &&
37 cat E0 E1 E2 E3 >expect
40 test_expect_success resolve '
43 git reset --hard anchor &&
45 if git merge -s resolve main
47 echo Oops, should not have succeeded
50 git ls-files -s >current
51 test_cmp expect current
55 test_expect_success recursive '
58 git reset --hard anchor &&
60 if git merge -s recursive main
62 echo Oops, should not have succeeded
65 git ls-files -s >current
66 test_cmp expect current