aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md4
-rwxr-xr-xcontrib/check-patches6
2 files changed, 9 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1a4d0bd2..6c9df2c7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -44,7 +44,9 @@ commits). Follow these general rules:
trailer with the commit id and its title.
- When in doubt, follow the format and layout of the recent existing commits.
- If your commit brings visible changes for end-users, add one of the following
- trailers with a short and concise description of the change.
+ trailers with a short and concise description of the change. The change
+ should be described in full sentences, starting with a capital letter and
+ ending in a period.
* `Changelog-added:` for new features.
* `Changelog-fixed:` for bug fixes.
diff --git a/contrib/check-patches b/contrib/check-patches
index 450eabae..cea65a1f 100755
--- a/contrib/check-patches
+++ b/contrib/check-patches
@@ -39,6 +39,12 @@ for rev in $revisions; do
err "'Signed-off-by: $author' trailer is missing"
fi
+ if git log --format="%(trailers:only,unfold)" -1 "$rev" | \
+ grep -v '^Changelog-[a-z]\+: [A-Z`\*_].\+\.$' | \
+ grep -q '^Changelog-[a-z]\+: '; then
+ err "Changelog-* trailers should start with a capital letter and end with a period"
+ fi
+
body=$(git log --format='%b' -1 "$rev")
body=${body%$(git log --format='%(trailers)' -1 "$rev")}
if [ "$(echo "$body" | wc -w)" -lt 3 ]; then