check-commit: remove confusion between summary line and other headers
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 06 Nov 2015 17:27:42 -0500
changeset 27199 8f5735b4aca5
parent 27198 7df042d0784f
child 27200 62b9a87a365e
check-commit: remove confusion between summary line and other headers The pull url header can easily grow over 80 chars. The check-commit script was confusing this with a too long summary line. We update the regular expression to not match other header.
contrib/check-commit
--- a/contrib/check-commit	Wed Dec 02 03:12:08 2015 +0900
+++ b/contrib/check-commit	Fri Nov 06 17:27:42 2015 -0500
@@ -27,7 +27,7 @@
     (r"^# .*\n[A-Z][a-z]\S+", "don't capitalize summary lines"),
     (r"^# .*\n[^\n]*: *[A-Z][a-z]\S+", "don't capitalize summary lines"),
     (r"^# .*\n.*\.\s+$", "don't add trailing period on summary line"),
-    (r"^# .*\n.{78,}", "summary line too long (limit is 78)"),
+    (r"^# .*\n[^#].{77,}", "summary line too long (limit is 78)"),
     (r"^\+\n \n", "adds double empty line"),
     (r"^ \n\+\n", "adds double empty line"),
     (r"^\+[ \t]+def [a-z]+_[a-z]", "adds a function with foo_bar naming"),