@@ -70,15 +70,13 @@ test_expect_success 'object with bad sha1' '
70
70
test_when_finished "git update-ref -d refs/heads/bogus" &&
71
71
72
72
test_must_fail git fsck 2>out &&
73
- cat out &&
74
73
test_i18ngrep "$sha.*corrupt" out
75
74
'
76
75
77
76
test_expect_success ' branch pointing to non-commit' '
78
77
git rev-parse HEAD^{tree} >.git/refs/heads/invalid &&
79
78
test_when_finished "git update-ref -d refs/heads/invalid" &&
80
79
test_must_fail git fsck 2>out &&
81
- cat out &&
82
80
test_i18ngrep "not a commit" out
83
81
'
84
82
@@ -88,7 +86,6 @@ test_expect_success 'HEAD link pointing at a funny object' '
88
86
echo $ZERO_OID >.git/HEAD &&
89
87
# avoid corrupt/broken HEAD from interfering with repo discovery
90
88
test_must_fail env GIT_DIR=.git git fsck 2>out &&
91
- cat out &&
92
89
test_i18ngrep "detached HEAD points" out
93
90
'
94
91
@@ -98,7 +95,6 @@ test_expect_success 'HEAD link pointing at a funny place' '
98
95
echo "ref: refs/funny/place" >.git/HEAD &&
99
96
# avoid corrupt/broken HEAD from interfering with repo discovery
100
97
test_must_fail env GIT_DIR=.git git fsck 2>out &&
101
- cat out &&
102
98
test_i18ngrep "HEAD points to something strange" out
103
99
'
104
100
@@ -157,7 +153,6 @@ test_expect_success 'email with embedded > is not okay' '
157
153
git update-ref refs/heads/bogus "$new" &&
158
154
test_when_finished "git update-ref -d refs/heads/bogus" &&
159
155
test_must_fail git fsck 2>out &&
160
- cat out &&
161
156
test_i18ngrep "error in commit $new" out
162
157
'
163
158
@@ -169,7 +164,6 @@ test_expect_success 'missing < email delimiter is reported nicely' '
169
164
git update-ref refs/heads/bogus "$new" &&
170
165
test_when_finished "git update-ref -d refs/heads/bogus" &&
171
166
test_must_fail git fsck 2>out &&
172
- cat out &&
173
167
test_i18ngrep "error in commit $new.* - bad name" out
174
168
'
175
169
@@ -181,7 +175,6 @@ test_expect_success 'missing email is reported nicely' '
181
175
git update-ref refs/heads/bogus "$new" &&
182
176
test_when_finished "git update-ref -d refs/heads/bogus" &&
183
177
test_must_fail git fsck 2>out &&
184
- cat out &&
185
178
test_i18ngrep "error in commit $new.* - missing email" out
186
179
'
187
180
@@ -193,7 +186,6 @@ test_expect_success '> in name is reported' '
193
186
git update-ref refs/heads/bogus "$new" &&
194
187
test_when_finished "git update-ref -d refs/heads/bogus" &&
195
188
test_must_fail git fsck 2>out &&
196
- cat out &&
197
189
test_i18ngrep "error in commit $new" out
198
190
'
199
191
@@ -207,7 +199,6 @@ test_expect_success 'integer overflow in timestamps is reported' '
207
199
git update-ref refs/heads/bogus "$new" &&
208
200
test_when_finished "git update-ref -d refs/heads/bogus" &&
209
201
test_must_fail git fsck 2>out &&
210
- cat out &&
211
202
test_i18ngrep "error in commit $new.*integer overflow" out
212
203
'
213
204
@@ -219,7 +210,6 @@ test_expect_success 'commit with NUL in header' '
219
210
git update-ref refs/heads/bogus "$new" &&
220
211
test_when_finished "git update-ref -d refs/heads/bogus" &&
221
212
test_must_fail git fsck 2>out &&
222
- cat out &&
223
213
test_i18ngrep "error in commit $new.*unterminated header: NUL at offset" out
224
214
'
225
215
@@ -297,7 +287,6 @@ test_expect_success 'tag pointing to nonexistent' '
297
287
echo $tag >.git/refs/tags/invalid &&
298
288
test_when_finished "git update-ref -d refs/tags/invalid" &&
299
289
test_must_fail git fsck --tags >out &&
300
- cat out &&
301
290
test_i18ngrep "broken link" out
302
291
'
303
292
@@ -378,7 +367,6 @@ test_expect_success 'tag with NUL in header' '
378
367
echo $tag >.git/refs/tags/wrong &&
379
368
test_when_finished "git update-ref -d refs/tags/wrong" &&
380
369
test_must_fail git fsck --tags 2>out &&
381
- cat out &&
382
370
test_i18ngrep "error in tag $tag.*unterminated header: NUL at offset" out
383
371
'
384
372
@@ -409,7 +397,6 @@ test_expect_success 'rev-list --verify-objects with bad sha1' '
409
397
test_when_finished "git update-ref -d refs/heads/bogus" &&
410
398
411
399
test_might_fail git rev-list --verify-objects refs/heads/bogus >/dev/null 2>out &&
412
- cat out &&
413
400
test_i18ngrep -q "error: hash mismatch $(dirname $new)$(test_oid ff_2)" out
414
401
'
415
402
@@ -433,7 +420,6 @@ test_expect_success 'fsck notices blob entry pointing to null sha1' '
433
420
sha=$(printf "100644 file$_bz$_bzoid" |
434
421
git hash-object -w --stdin -t tree) &&
435
422
git fsck 2>out &&
436
- cat out &&
437
423
test_i18ngrep "warning.*null sha1" out
438
424
)
439
425
'
@@ -444,7 +430,6 @@ test_expect_success 'fsck notices submodule entry pointing to null sha1' '
444
430
sha=$(printf "160000 submodule$_bz$_bzoid" |
445
431
git hash-object -w --stdin -t tree) &&
446
432
git fsck 2>out &&
447
- cat out &&
448
433
test_i18ngrep "warning.*null sha1" out
449
434
)
450
435
'
@@ -465,7 +450,6 @@ while read name path pretty; do
465
450
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
466
451
bad_tree=$(git mktree <bad) &&
467
452
git fsck 2>out &&
468
- cat out &&
469
453
test_i18ngrep "warning.*tree $bad_tree" out
470
454
)'
471
455
done << -\EOF
0 commit comments