changeset 27692:e0465035def9

check-commit: try to curb bad commit summary keywords The goal of commit summary keywords is to help us sort, categorize, and filter our voluminous commits for our release notes in a way that's helpful and meaningful to end users. Lately, there have been a huge number of "keywords" that are neither words nor particularly key. This patch tries to discourage that by narrowing the allowed characters to alphanumeric. In particular, it doesn't allow "." (method, function names, and file extensions) and "/" (filenames). It also gives a short reminder of what a keyword ought to be.
author Matt Mackall <mpm@selenic.com>
date Thu, 10 Dec 2015 12:56:23 -0600
parents b0d23a55f91e
children 2b9126d6588b
files contrib/check-commit
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-commit	Fri Jan 08 14:47:02 2016 -0800
+++ b/contrib/check-commit	Thu Dec 10 12:56:23 2015 -0600
@@ -26,6 +26,8 @@
      "summary line doesn't start with 'topic: '"),
     (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]*\n\S*[^A-Za-z0-9-]\S*: ",
+     "summary keyword should be most user-relevant one-word command or topic"),
     (r"^# .*\n.*\.\s+$", "don't add trailing period on summary line"),
     (r"^# .*\n[^#].{77,}", "summary line too long (limit is 78)"),
     (r"^\+\n \n", "adds double empty line"),