[PATCH] check-commit: catch both patterns of double empty lines

Yuya Nishihara yuya at tcha.org
Sun Jun 21 08:29:44 UTC 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1434867529 -32400
#      Sun Jun 21 15:18:49 2015 +0900
# Node ID a7bb8219ee0a80b8f849b5c7a2fe1f9227e8e0c7
# Parent  7fdd1782fc4ee9da87d8af13e806dc9055db2c38
check-commit: catch both patterns of double empty lines

diff --git a/contrib/check-commit b/contrib/check-commit
--- a/contrib/check-commit
+++ b/contrib/check-commit
@@ -29,6 +29,7 @@ errors = [
     (r"^# .*\n.*\.\s+$", "don't add trailing period on summary line"),
     (r"^# .*\n.{78,}", "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"),
 ]
 


More information about the Mercurial-devel mailing list