]>
Commit | Line | Data |
---|---|---|
b798671f JH |
1 | #!/bin/sh |
2 | ||
3 | test_description='ask merge-recursive to merge binary files' | |
4 | ||
5902f5f4 | 5 | GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main |
334afbc7 JS |
6 | export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME |
7 | ||
b798671f JH |
8 | . ./test-lib.sh |
9 | ||
10 | test_expect_success setup ' | |
11 | ||
b5967f82 | 12 | cat "$TEST_DIRECTORY"/test-binary-1.png >m && |
b798671f JH |
13 | git add m && |
14 | git ls-files -s | sed -e "s/ 0 / 1 /" >E1 && | |
15 | test_tick && | |
16 | git commit -m "initial" && | |
17 | ||
18 | git branch side && | |
19 | echo frotz >a && | |
20 | git add a && | |
21 | echo nitfol >>m && | |
22 | git add a m && | |
23 | git ls-files -s a >E0 && | |
24 | git ls-files -s m | sed -e "s/ 0 / 3 /" >E3 && | |
25 | test_tick && | |
5902f5f4 | 26 | git commit -m "main adds some" && |
b798671f JH |
27 | |
28 | git checkout side && | |
29 | echo rezrov >>m && | |
30 | git add m && | |
31 | git ls-files -s m | sed -e "s/ 0 / 2 /" >E2 && | |
32 | test_tick && | |
33 | git commit -m "side modifies" && | |
34 | ||
35 | git tag anchor && | |
36 | ||
37 | cat E0 E1 E2 E3 >expect | |
38 | ' | |
39 | ||
40 | test_expect_success resolve ' | |
41 | ||
42 | rm -f a* m* && | |
43 | git reset --hard anchor && | |
44 | ||
8127a2b1 ÆAB |
45 | test_must_fail git merge -s resolve main && |
46 | git ls-files -s >current && | |
47 | test_cmp expect current | |
b798671f JH |
48 | ' |
49 | ||
50 | test_expect_success recursive ' | |
51 | ||
52 | rm -f a* m* && | |
53 | git reset --hard anchor && | |
54 | ||
8127a2b1 ÆAB |
55 | test_must_fail git merge -s recursive main && |
56 | git ls-files -s >current && | |
57 | test_cmp expect current | |
b798671f JH |
58 | ' |
59 | ||
60 | test_done |