Re: [PATCH] fsck: check ident lines in commit objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder wrote:

> Check that email addresses do not contain <, >, or newline so they can
> be quickly scanned without trouble.

Test was bogus: the object format tests in fsck do not affect its exit
code.  Here’s a fixup.

Sorry for the trouble,
Jonathan

diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
index d8eed9b..22a80c8 100755
--- a/t/t1450-fsck.sh
+++ b/t/t1450-fsck.sh
@@ -64,7 +64,9 @@ test_expect_success 'email without @ is okay' '
 	new=$(git hash-object -t commit -w --stdin <okay) &&
 	echo "$new" &&
 	git update-ref refs/heads/bogus "$new" &&
-	git fsck
+	git fsck 2>out &&
+	cat out &&
+	! grep "error in commit $new" out
 '
 git update-ref -d refs/heads/bogus
 rm -f ".git/objects/$new"
@@ -77,6 +79,7 @@ test_expect_success 'email with embedded > is not okay' '
 	echo "$new" &&
 	git update-ref refs/heads/bogus "$new" &&
 	git fsck 2>out &&
+	cat out &&
 	grep "error in commit $new" out
 '
 git update-ref -d refs/heads/bogus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]