51
treeM=$(git write-tree) &&
52
echo treeM $treeM &&
53
git ls-tree $treeM &&
54
- sum bozbar frotz nitfol >M.sum &&
54
+ cp bozbar bozbar.M &&
55
+ cp frotz frotz.M &&
56
+ cp nitfol nitfol.M &&
57
git diff-tree $treeH $treeM'
58
59
test_expect_success \
63
read_tree_u_must_succeed -m -u $treeH $treeM &&
64
git ls-files --stage >1-3.out &&
65
cmp M.out 1-3.out &&
64
- sum bozbar frotz nitfol >actual3.sum &&
65
- cmp M.sum actual3.sum &&
66
+ test_cmp bozbar.M bozbar &&
67
+ test_cmp frotz.M frotz &&
68
+ test_cmp nitfol.M nitfol &&
69
check_cache_at bozbar clean &&
70
check_cache_at frotz clean &&
71
check_cache_at nitfol clean'
82
test_might_fail git diff -U0 --no-index M.out 4.out >4diff.out &&
83
compare_change 4diff.out expected &&
84
check_cache_at yomin clean &&
82
- sum bozbar frotz nitfol >actual4.sum &&
83
- cmp M.sum actual4.sum &&
85
+ test_cmp bozbar.M bozbar &&
86
+ test_cmp frotz.M frotz &&
87
+ test_cmp nitfol.M nitfol &&
88
echo yomin >yomin1 &&
89
diff yomin yomin1 &&
90
rm -f yomin1'
102
test_might_fail git diff -U0 --no-index M.out 5.out >5diff.out &&
103
compare_change 5diff.out expected &&
104
check_cache_at yomin dirty &&
101
- sum bozbar frotz nitfol >actual5.sum &&
102
- cmp M.sum actual5.sum &&
105
+ test_cmp bozbar.M bozbar &&
106
+ test_cmp frotz.M frotz &&
107
+ test_cmp nitfol.M nitfol &&
108
: dirty index should have prevented -u from checking it out. &&
109
echo yomin yomin >yomin1 &&
110
diff yomin yomin1 &&
120
git ls-files --stage >6.out &&
121
test_cmp M.out 6.out &&
122
check_cache_at frotz clean &&
118
- sum bozbar frotz nitfol >actual3.sum &&
119
- cmp M.sum actual3.sum &&
123
+ test_cmp bozbar.M bozbar &&
124
+ test_cmp frotz.M frotz &&
125
+ test_cmp nitfol.M nitfol &&
126
echo frotz >frotz1 &&
127
diff frotz frotz1 &&
128
rm -f frotz1'
138
git ls-files --stage >7.out &&
139
test_cmp M.out 7.out &&
140
check_cache_at frotz dirty &&
135
- sum bozbar frotz nitfol >actual7.sum &&
136
- if cmp M.sum actual7.sum; then false; else :; fi &&
141
+ test_cmp bozbar.M bozbar &&
142
+ test_cmp nitfol.M nitfol &&
143
: dirty index should have prevented -u from checking it out. &&
144
echo frotz frotz >frotz1 &&
145
diff frotz frotz1 &&
171
read_tree_u_must_succeed -m -u $treeH $treeM &&
172
git ls-files --stage >10.out &&
173
cmp M.out 10.out &&
168
- sum bozbar frotz nitfol >actual10.sum &&
169
- cmp M.sum actual10.sum'
174
+ test_cmp bozbar.M bozbar &&
175
+ test_cmp frotz.M frotz &&
176
+ test_cmp nitfol.M nitfol
177
+'
178
179
test_expect_success \
180
'11 - dirty path removed.' \
217
git ls-files --stage >14.out &&
218
test_must_fail git diff -U0 --no-index M.out 14.out >14diff.out &&
219
compare_change 14diff.out expected &&
212
- sum bozbar frotz >actual14.sum &&
213
- grep -v nitfol M.sum > expected14.sum &&
214
- cmp expected14.sum actual14.sum &&
215
- sum bozbar frotz nitfol >actual14a.sum &&
216
- if cmp M.sum actual14a.sum; then false; else :; fi &&
220
+ test_cmp bozbar.M bozbar &&
221
+ test_cmp frotz.M frotz &&
222
check_cache_at nitfol clean &&
223
echo nitfol nitfol >nitfol1 &&
224
diff nitfol nitfol1 &&
236
test_must_fail git diff -U0 --no-index M.out 15.out >15diff.out &&
237
compare_change 15diff.out expected &&
238
check_cache_at nitfol dirty &&
234
- sum bozbar frotz >actual15.sum &&
235
- grep -v nitfol M.sum > expected15.sum &&
236
- cmp expected15.sum actual15.sum &&
237
- sum bozbar frotz nitfol >actual15a.sum &&
238
- if cmp M.sum actual15a.sum; then false; else :; fi &&
239
+ test_cmp bozbar.M bozbar &&
240
+ test_cmp frotz.M frotz &&
241
echo nitfol nitfol nitfol >nitfol1 &&
242
diff nitfol nitfol1 &&
243
rm -f nitfol1'
269
git ls-files --stage >18.out &&
270
test_cmp M.out 18.out &&
271
check_cache_at bozbar clean &&
270
- sum bozbar frotz nitfol >actual18.sum &&
271
- cmp M.sum actual18.sum'
272
+ test_cmp bozbar.M bozbar &&
273
+ test_cmp frotz.M frotz &&
274
+ test_cmp nitfol.M nitfol
275
+'
276
277
test_expect_success \
278
'19 - local change already having a good result, further modified.' \
285
git ls-files --stage >19.out &&
286
test_cmp M.out 19.out &&
287
check_cache_at bozbar dirty &&
284
- sum frotz nitfol >actual19.sum &&
285
- grep -v bozbar M.sum > expected19.sum &&
286
- cmp expected19.sum actual19.sum &&
287
- sum bozbar frotz nitfol >actual19a.sum &&
288
- if cmp M.sum actual19a.sum; then false; else :; fi &&
288
+ test_cmp frotz.M frotz &&
289
+ test_cmp nitfol.M nitfol &&
290
echo gnusto gnusto >bozbar1 &&
291
diff bozbar bozbar1 &&
292
rm -f bozbar1'
301
git ls-files --stage >20.out &&
302
test_cmp M.out 20.out &&
303
check_cache_at bozbar clean &&
303
- sum bozbar frotz nitfol >actual20.sum &&
304
- cmp M.sum actual20.sum'
304
+ test_cmp bozbar.M bozbar &&
305
+ test_cmp frotz.M frotz &&
306
+ test_cmp nitfol.M nitfol
307
+'
308
309
test_expect_success \
310
'21 - no local change, dirty cache.' \