# HG changeset patch # User Martin von Zweigbergk # Date 2018-12-14 21:32:34 # Node ID 811f772b44aa1dc152de7395aa55fbe2337440b3 # Parent e993a86cfcb8842632879fb8823edb6c189f52d8 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 diff --git a/contrib/check-commit b/contrib/check-commit --- a/contrib/check-commit +++ b/contrib/check-commit @@ -34,7 +34,7 @@ errors = [ (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"),