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
8 TEST_PASSES_SANITIZE_LEAK
=true
11 test_expect_success setup
'
13 cat "$TEST_DIRECTORY"/test-binary-1.png >m &&
15 git ls-files -s | sed -e "s/ 0 / 1 /" >E1 &&
17 git commit -m "initial" &&
24 git ls-files -s a >E0 &&
25 git ls-files -s m | sed -e "s/ 0 / 3 /" >E3 &&
27 git commit -m "main adds some" &&
32 git ls-files -s m | sed -e "s/ 0 / 2 /" >E2 &&
34 git commit -m "side modifies" &&
38 cat E0 E1 E2 E3 >expect
41 test_expect_success resolve
'
44 git reset --hard anchor &&
46 test_must_fail git merge -s resolve main &&
47 git ls-files -s >current &&
48 test_cmp expect current
51 test_expect_success recursive
'
54 git reset --hard anchor &&
56 test_must_fail git merge -s recursive main &&
57 git ls-files -s >current &&
58 test_cmp expect current