about summary refs log tree commit diff
path: root/third_party/git/t/t1450-fsck.sh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/t/t1450-fsck.sh')
-rwxr-xr-xthird_party/git/t/t1450-fsck.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/third_party/git/t/t1450-fsck.sh b/third_party/git/t/t1450-fsck.sh
index d09eff503c..b36e0528d0 100755
--- a/third_party/git/t/t1450-fsck.sh
+++ b/third_party/git/t/t1450-fsck.sh
@@ -70,6 +70,7 @@ test_expect_success 'object with bad sha1' '
 	test_when_finished "git update-ref -d refs/heads/bogus" &&
 
 	test_must_fail git fsck 2>out &&
+	cat out &&
 	test_i18ngrep "$sha.*corrupt" out
 '
 
@@ -77,6 +78,7 @@ test_expect_success 'branch pointing to non-commit' '
 	git rev-parse HEAD^{tree} >.git/refs/heads/invalid &&
 	test_when_finished "git update-ref -d refs/heads/invalid" &&
 	test_must_fail git fsck 2>out &&
+	cat out &&
 	test_i18ngrep "not a commit" out
 '
 
@@ -86,6 +88,7 @@ test_expect_success 'HEAD link pointing at a funny object' '
 	echo $ZERO_OID >.git/HEAD &&
 	# avoid corrupt/broken HEAD from interfering with repo discovery
 	test_must_fail env GIT_DIR=.git git fsck 2>out &&
+	cat out &&
 	test_i18ngrep "detached HEAD points" out
 '
 
@@ -95,6 +98,7 @@ test_expect_success 'HEAD link pointing at a funny place' '
 	echo "ref: refs/funny/place" >.git/HEAD &&
 	# avoid corrupt/broken HEAD from interfering with repo discovery
 	test_must_fail env GIT_DIR=.git git fsck 2>out &&
+	cat out &&
 	test_i18ngrep "HEAD points to something strange" out
 '
 
@@ -141,6 +145,7 @@ test_expect_success 'email without @ is okay' '
 	git update-ref refs/heads/bogus "$new" &&
 	test_when_finished "git update-ref -d refs/heads/bogus" &&
 	git fsck 2>out &&
+	cat out &&
 	! grep "commit $new" out
 '
 
@@ -152,6 +157,7 @@ test_expect_success 'email with embedded > is not okay' '
 	git update-ref refs/heads/bogus "$new" &&
 	test_when_finished "git update-ref -d refs/heads/bogus" &&
 	test_must_fail git fsck 2>out &&
+	cat out &&
 	test_i18ngrep "error in commit $new" out
 '
 
@@ -163,6 +169,7 @@ test_expect_success 'missing < email delimiter is reported nicely' '
 	git update-ref refs/heads/bogus "$new" &&
 	test_when_finished "git update-ref -d refs/heads/bogus" &&
 	test_must_fail git fsck 2>out &&
+	cat out &&
 	test_i18ngrep "error in commit $new.* - bad name" out
 '
 
@@ -174,6 +181,7 @@ test_expect_success 'missing email is reported nicely' '
 	git update-ref refs/heads/bogus "$new" &&
 	test_when_finished "git update-ref -d refs/heads/bogus" &&
 	test_must_fail git fsck 2>out &&
+	cat out &&
 	test_i18ngrep "error in commit $new.* - missing email" out
 '
 
@@ -185,6 +193,7 @@ test_expect_success '> in name is reported' '
 	git update-ref refs/heads/bogus "$new" &&
 	test_when_finished "git update-ref -d refs/heads/bogus" &&
 	test_must_fail git fsck 2>out &&
+	cat out &&
 	test_i18ngrep "error in commit $new" out
 '
 
@@ -198,6 +207,7 @@ test_expect_success 'integer overflow in timestamps is reported' '
 	git update-ref refs/heads/bogus "$new" &&
 	test_when_finished "git update-ref -d refs/heads/bogus" &&
 	test_must_fail git fsck 2>out &&
+	cat out &&
 	test_i18ngrep "error in commit $new.*integer overflow" out
 '
 
@@ -209,6 +219,7 @@ test_expect_success 'commit with NUL in header' '
 	git update-ref refs/heads/bogus "$new" &&
 	test_when_finished "git update-ref -d refs/heads/bogus" &&
 	test_must_fail git fsck 2>out &&
+	cat out &&
 	test_i18ngrep "error in commit $new.*unterminated header: NUL at offset" out
 '
 
@@ -286,6 +297,7 @@ test_expect_success 'tag pointing to nonexistent' '
 	echo $tag >.git/refs/tags/invalid &&
 	test_when_finished "git update-ref -d refs/tags/invalid" &&
 	test_must_fail git fsck --tags >out &&
+	cat out &&
 	test_i18ngrep "broken link" out
 '
 
@@ -366,6 +378,7 @@ test_expect_success 'tag with NUL in header' '
 	echo $tag >.git/refs/tags/wrong &&
 	test_when_finished "git update-ref -d refs/tags/wrong" &&
 	test_must_fail git fsck --tags 2>out &&
+	cat out &&
 	test_i18ngrep "error in tag $tag.*unterminated header: NUL at offset" out
 '
 
@@ -396,6 +409,7 @@ test_expect_success 'rev-list --verify-objects with bad sha1' '
 	test_when_finished "git update-ref -d refs/heads/bogus" &&
 
 	test_might_fail git rev-list --verify-objects refs/heads/bogus >/dev/null 2>out &&
+	cat out &&
 	test_i18ngrep -q "error: hash mismatch $(dirname $new)$(test_oid ff_2)" out
 '
 
@@ -419,6 +433,7 @@ test_expect_success 'fsck notices blob entry pointing to null sha1' '
 	 sha=$(printf "100644 file$_bz$_bzoid" |
 	       git hash-object -w --stdin -t tree) &&
 	  git fsck 2>out &&
+	  cat out &&
 	  test_i18ngrep "warning.*null sha1" out
 	)
 '
@@ -429,6 +444,7 @@ test_expect_success 'fsck notices submodule entry pointing to null sha1' '
 	 sha=$(printf "160000 submodule$_bz$_bzoid" |
 	       git hash-object -w --stdin -t tree) &&
 	  git fsck 2>out &&
+	  cat out &&
 	  test_i18ngrep "warning.*null sha1" out
 	)
 '
@@ -440,7 +456,6 @@ while read name path pretty; do
 		(
 			git init $name-$type &&
 			cd $name-$type &&
-			git config core.protectNTFS false &&
 			echo content >file &&
 			git add file &&
 			git commit -m base &&
@@ -450,6 +465,7 @@ while read name path pretty; do
 			printf "$mode $type %s\t%s" "$value" "$path" >bad &&
 			bad_tree=$(git mktree <bad) &&
 			git fsck 2>out &&
+			cat out &&
 			test_i18ngrep "warning.*tree $bad_tree" out
 		)'
 	done <<-\EOF
@@ -616,7 +632,7 @@ test_expect_success 'fsck --name-objects' '
 		remove_object $(git rev-parse julius:caesar.t) &&
 		test_must_fail git fsck --name-objects >out &&
 		tree=$(git rev-parse --verify julius:) &&
-		test_i18ngrep "$tree (refs/tags/julius:" out
+		test_i18ngrep -E "$tree \((refs/heads/master|HEAD)@\{[0-9]*\}:" out
 	)
 '