Thread (12 messages) flat view 12 messages, 3 authors, 2016-06-15

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

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:48:42
Subsystem: the rest · Maintainer: Linus Torvalds

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help