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 test_must_fail git merge -s resolve main &&
46 git ls-files -s >current &&
47 test_cmp expect current
50 test_expect_success recursive
'
53 git reset --hard anchor &&
55 test_must_fail git merge -s recursive main &&
56 git ls-files -s >current &&
57 test_cmp expect current