3 test_description
='read-tree D/F conflict corner cases'
5 TEST_PASSES_SANITIZE_LEAK
=true
7 .
"$TEST_DIRECTORY"/lib-read-tree.sh
11 rm -f .git
/index .git
/index.lock
&&
12 git clean
-d -f -f -q -x &&
17 path
=$
(expr "$it" : '\([^:]*\)') &&
18 mkdir
-p $
(dirname "$path") &&
19 echo "$it" >"$path" &&
20 git update-index
--add "$path" ||
exit
22 git tag
"$name" $
(git write-tree
)
27 rm -f .git
/index .git
/index.lock
&&
28 git clean
-d -f -f -q -x &&
30 git checkout-index
-f -q -u -a &&
31 git update-index
--refresh
36 sed "s|^[0-7][0-7]* $OID_REGEX \([0-3]\) |\1 |" >current
&&
38 test_cmp expect current
41 test_expect_success setup
'
42 maketree O-000 a/b-2/c/d a/b/c/d a/x &&
43 maketree A-000 a/b-2/c/d a/b/c/d a/x &&
44 maketree A-001 a/b-2/c/d a/b/c/d a/b/c/e a/x &&
45 maketree B-000 a/b-2/c/d a/b a/x &&
47 maketree O-010 t-0 t/1 t/2 t=3 &&
48 maketree A-010 t-0 t t=3 &&
49 maketree B-010 t/1: t=3: &&
51 maketree O-020 ds/dma/ioat.c ds/dma/ioat_dca.c &&
52 maketree A-020 ds/dma/ioat/Makefile ds/dma/ioat/registers.h &&
56 test_expect_success
'3-way (1)' '
58 read_tree_u_must_succeed -m -u O-000 A-000 B-000 &&
68 test_expect_success
'3-way (2)' '
70 read_tree_u_must_succeed -m -u O-000 A-001 B-000 &&
81 test_expect_success
'3-way (3)' '
83 read_tree_u_must_succeed -m -u O-010 A-010 B-010 &&
95 test_expect_success
'2-way (1)' '
97 read_tree_u_must_succeed -m -u O-020 A-020 &&
99 0 ds/dma/ioat/Makefile
100 0 ds/dma/ioat/registers.h