3 test_description='read-tree D/F conflict corner cases'
9 rm -f .git/index .git/index.lock &&
10 git clean -d -f -f -q -x &&
15 path=$(expr "$it" : '\([^:]*\)') &&
16 mkdir -p $(dirname "$path") &&
17 echo "$it" >"$path" &&
18 git update-index --add "$path" || exit
20 git tag "$name" $(git write-tree)
25 rm -f .git/index .git/index.lock &&
26 git clean -d -f -f -q -x &&
28 git checkout-index -f -q -u -a &&
29 git update-index --refresh
34 sed "s|^[0-7][0-7]* $_x40 \([0-3]\) |\1 |" >current &&
36 test_cmp expect current
39 test_expect_success setup '
40 maketree O-000 a/b-2/c/d a/b/c/d a/x &&
41 maketree A-000 a/b-2/c/d a/b/c/d a/x &&
42 maketree A-001 a/b-2/c/d a/b/c/d a/b/c/e a/x &&
43 maketree B-000 a/b-2/c/d a/b a/x &&
45 maketree O-010 t-0 t/1 t/2 t=3 &&
46 maketree A-010 t-0 t t=3 &&
47 maketree B-010 t/1: t=3: &&
51 test_expect_success '3-way (1)' '
53 git read-tree -m -u O-000 A-000 B-000 &&
63 test_expect_success '3-way (2)' '
65 git read-tree -m -u O-000 A-001 B-000 &&
76 test_expect_success '3-way (3)' '
78 git read-tree -m -u O-010 A-010 B-010 &&