@@ -17,6 +17,7 @@ test_expect_success 'prepare reference tree' '
17
17
echo $tree
18
18
'
19
19
20
+ blob=$( git hash-object " $TEST_DIRECTORY /diff-lib/COPYING" )
20
21
test_expect_success ' prepare work tree' '
21
22
cp path0/COPYING path1/COPYING &&
22
23
git update-index --add --remove path0/COPYING path1/COPYING
@@ -26,8 +27,8 @@ test_expect_success 'prepare work tree' '
26
27
# path1 both have COPYING and the latter is a copy of path0/COPYING.
27
28
# Comparing the full tree with cache should tell us so.
28
29
29
- cat > expected << \ EOF
30
- :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 6ff87c4664981e4397625791c8ea3bbb5f2279a3 C100 path0/COPYING path1/COPYING
30
+ cat > expected << EOF
31
+ :100644 100644 $blob $blob C100 path0/COPYING path1/COPYING
31
32
EOF
32
33
33
34
test_expect_success ' copy detection' '
@@ -46,8 +47,8 @@ test_expect_success 'copy detection, cached' '
46
47
# path1/COPYING suddenly appearing from nowhere, not detected as
47
48
# a copy from path0/COPYING.
48
49
49
- cat > expected << \ EOF
50
- :000000 100644 0000000000000000000000000000000000000000 6ff87c4664981e4397625791c8ea3bbb5f2279a3 A path1/COPYING
50
+ cat > expected << EOF
51
+ :000000 100644 $ZERO_OID $blob A path1/COPYING
51
52
EOF
52
53
53
54
test_expect_success ' copy, limited to a subtree' '
@@ -64,8 +65,8 @@ test_expect_success 'tweak work tree' '
64
65
# path0/COPYING. Showing the full tree with cache should tell us about
65
66
# the rename.
66
67
67
- cat > expected << \ EOF
68
- :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 6ff87c4664981e4397625791c8ea3bbb5f2279a3 R100 path0/COPYING path1/COPYING
68
+ cat > expected << EOF
69
+ :100644 100644 $blob $blob R100 path0/COPYING path1/COPYING
69
70
EOF
70
71
71
72
test_expect_success ' rename detection' '
@@ -78,8 +79,8 @@ test_expect_success 'rename detection' '
78
79
# path0/COPYING. When we say we care only about path1, we should just
79
80
# see path1/COPYING appearing from nowhere.
80
81
81
- cat > expected << \ EOF
82
- :000000 100644 0000000000000000000000000000000000000000 6ff87c4664981e4397625791c8ea3bbb5f2279a3 A path1/COPYING
82
+ cat > expected << EOF
83
+ :000000 100644 $ZERO_OID $blob A path1/COPYING
83
84
EOF
84
85
85
86
test_expect_success ' rename, limited to a subtree' '
0 commit comments