]> git.ipfire.org Git - thirdparty/git.git/blame - t/t6027-merge-binary.sh
path.c: don't call the match function without value in trie_find()
[thirdparty/git.git] / t / t6027-merge-binary.sh
CommitLineData
b798671f
JH
1#!/bin/sh
2
3test_description='ask merge-recursive to merge binary files'
4
5. ./test-lib.sh
6
7test_expect_success setup '
8
b5967f82 9 cat "$TEST_DIRECTORY"/test-binary-1.png >m &&
b798671f
JH
10 git add m &&
11 git ls-files -s | sed -e "s/ 0 / 1 /" >E1 &&
12 test_tick &&
13 git commit -m "initial" &&
14
15 git branch side &&
16 echo frotz >a &&
17 git add a &&
18 echo nitfol >>m &&
19 git add a m &&
20 git ls-files -s a >E0 &&
21 git ls-files -s m | sed -e "s/ 0 / 3 /" >E3 &&
22 test_tick &&
23 git commit -m "master adds some" &&
24
25 git checkout side &&
26 echo rezrov >>m &&
27 git add m &&
28 git ls-files -s m | sed -e "s/ 0 / 2 /" >E2 &&
29 test_tick &&
30 git commit -m "side modifies" &&
31
32 git tag anchor &&
33
34 cat E0 E1 E2 E3 >expect
35'
36
37test_expect_success resolve '
38
39 rm -f a* m* &&
40 git reset --hard anchor &&
41
42 if git merge -s resolve master
43 then
44 echo Oops, should not have succeeded
45 false
46 else
47 git ls-files -s >current
dcbaa0b3 48 test_cmp expect current
b798671f
JH
49 fi
50'
51
52test_expect_success recursive '
53
54 rm -f a* m* &&
55 git reset --hard anchor &&
56
57 if git merge -s recursive master
58 then
59 echo Oops, should not have succeeded
60 false
61 else
62 git ls-files -s >current
dcbaa0b3 63 test_cmp expect current
b798671f
JH
64 fi
65'
66
67test_done