changeset 40952:811f772b44aa

check-commit: disallow capitalization only right after topic It should be okay to write "topic: change 'default: True' to 'default: on'". Differential Revision: https://phab.mercurial-scm.org/D5429
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 14 Dec 2018 13:32:34 -0800
parents e993a86cfcb8
children 05abb5fb146a
files contrib/check-commit
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-commit	Thu Dec 13 20:39:25 2018 -0800
+++ b/contrib/check-commit	Fri Dec 14 13:32:34 2018 -0800
@@ -34,7 +34,7 @@
     (commitheader + r"(?!merge with )[^#]\S+[^:] ",
      "summary line doesn't start with 'topic: '"),
     (afterheader + r"[A-Z][a-z]\S+", "don't capitalize summary lines"),
-    (afterheader + r"[^\n]*: *[A-Z][a-z]\S+", "don't capitalize summary lines"),
+    (afterheader + r"^\S+: *[A-Z][a-z]\S+", "don't capitalize summary lines"),
     (afterheader + r"\S*[^A-Za-z0-9-_]\S*: ",
      "summary keyword should be most user-relevant one-word command or topic"),
     (afterheader + r".*\.\s*\n", "don't add trailing period on summary line"),