@@ -70,15 +70,13 @@ test_expect_success 'object with bad sha1' '
7070 test_when_finished "git update-ref -d refs/heads/bogus" &&
7171
7272 test_must_fail git fsck 2>out &&
73- cat out &&
7473 test_i18ngrep "$sha.*corrupt" out
7574'
7675
7776test_expect_success ' branch pointing to non-commit' '
7877 git rev-parse HEAD^{tree} >.git/refs/heads/invalid &&
7978 test_when_finished "git update-ref -d refs/heads/invalid" &&
8079 test_must_fail git fsck 2>out &&
81- cat out &&
8280 test_i18ngrep "not a commit" out
8381'
8482
@@ -88,7 +86,6 @@ test_expect_success 'HEAD link pointing at a funny object' '
8886 echo $ZERO_OID >.git/HEAD &&
8987 # avoid corrupt/broken HEAD from interfering with repo discovery
9088 test_must_fail env GIT_DIR=.git git fsck 2>out &&
91- cat out &&
9289 test_i18ngrep "detached HEAD points" out
9390'
9491
@@ -98,7 +95,6 @@ test_expect_success 'HEAD link pointing at a funny place' '
9895 echo "ref: refs/funny/place" >.git/HEAD &&
9996 # avoid corrupt/broken HEAD from interfering with repo discovery
10097 test_must_fail env GIT_DIR=.git git fsck 2>out &&
101- cat out &&
10298 test_i18ngrep "HEAD points to something strange" out
10399'
104100
@@ -157,7 +153,6 @@ test_expect_success 'email with embedded > is not okay' '
157153 git update-ref refs/heads/bogus "$new" &&
158154 test_when_finished "git update-ref -d refs/heads/bogus" &&
159155 test_must_fail git fsck 2>out &&
160- cat out &&
161156 test_i18ngrep "error in commit $new" out
162157'
163158
@@ -169,7 +164,6 @@ test_expect_success 'missing < email delimiter is reported nicely' '
169164 git update-ref refs/heads/bogus "$new" &&
170165 test_when_finished "git update-ref -d refs/heads/bogus" &&
171166 test_must_fail git fsck 2>out &&
172- cat out &&
173167 test_i18ngrep "error in commit $new.* - bad name" out
174168'
175169
@@ -181,7 +175,6 @@ test_expect_success 'missing email is reported nicely' '
181175 git update-ref refs/heads/bogus "$new" &&
182176 test_when_finished "git update-ref -d refs/heads/bogus" &&
183177 test_must_fail git fsck 2>out &&
184- cat out &&
185178 test_i18ngrep "error in commit $new.* - missing email" out
186179'
187180
@@ -193,7 +186,6 @@ test_expect_success '> in name is reported' '
193186 git update-ref refs/heads/bogus "$new" &&
194187 test_when_finished "git update-ref -d refs/heads/bogus" &&
195188 test_must_fail git fsck 2>out &&
196- cat out &&
197189 test_i18ngrep "error in commit $new" out
198190'
199191
@@ -207,7 +199,6 @@ test_expect_success 'integer overflow in timestamps is reported' '
207199 git update-ref refs/heads/bogus "$new" &&
208200 test_when_finished "git update-ref -d refs/heads/bogus" &&
209201 test_must_fail git fsck 2>out &&
210- cat out &&
211202 test_i18ngrep "error in commit $new.*integer overflow" out
212203'
213204
@@ -219,7 +210,6 @@ test_expect_success 'commit with NUL in header' '
219210 git update-ref refs/heads/bogus "$new" &&
220211 test_when_finished "git update-ref -d refs/heads/bogus" &&
221212 test_must_fail git fsck 2>out &&
222- cat out &&
223213 test_i18ngrep "error in commit $new.*unterminated header: NUL at offset" out
224214'
225215
@@ -297,7 +287,6 @@ test_expect_success 'tag pointing to nonexistent' '
297287 echo $tag >.git/refs/tags/invalid &&
298288 test_when_finished "git update-ref -d refs/tags/invalid" &&
299289 test_must_fail git fsck --tags >out &&
300- cat out &&
301290 test_i18ngrep "broken link" out
302291'
303292
@@ -378,7 +367,6 @@ test_expect_success 'tag with NUL in header' '
378367 echo $tag >.git/refs/tags/wrong &&
379368 test_when_finished "git update-ref -d refs/tags/wrong" &&
380369 test_must_fail git fsck --tags 2>out &&
381- cat out &&
382370 test_i18ngrep "error in tag $tag.*unterminated header: NUL at offset" out
383371'
384372
@@ -409,7 +397,6 @@ test_expect_success 'rev-list --verify-objects with bad sha1' '
409397 test_when_finished "git update-ref -d refs/heads/bogus" &&
410398
411399 test_might_fail git rev-list --verify-objects refs/heads/bogus >/dev/null 2>out &&
412- cat out &&
413400 test_i18ngrep -q "error: hash mismatch $(dirname $new)$(test_oid ff_2)" out
414401'
415402
@@ -433,7 +420,6 @@ test_expect_success 'fsck notices blob entry pointing to null sha1' '
433420 sha=$(printf "100644 file$_bz$_bzoid" |
434421 git hash-object -w --stdin -t tree) &&
435422 git fsck 2>out &&
436- cat out &&
437423 test_i18ngrep "warning.*null sha1" out
438424 )
439425'
@@ -444,7 +430,6 @@ test_expect_success 'fsck notices submodule entry pointing to null sha1' '
444430 sha=$(printf "160000 submodule$_bz$_bzoid" |
445431 git hash-object -w --stdin -t tree) &&
446432 git fsck 2>out &&
447- cat out &&
448433 test_i18ngrep "warning.*null sha1" out
449434 )
450435'
@@ -465,7 +450,6 @@ while read name path pretty; do
465450 printf "$mode $type %s\t%s" "$value" "$path" >bad &&
466451 bad_tree=$(git mktree <bad) &&
467452 git fsck 2>out &&
468- cat out &&
469453 test_i18ngrep "warning.*tree $bad_tree" out
470454 )'
471455 done << -\EOF
0 commit comments