summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2013-02-14 00:28:06 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2013-02-14 23:19:57 +0100
commitc53c5e2395d206a1ab2c821eed8414270fbc07b4 (patch)
treee677ac466053241731c29c99052e4ce96d5e745a /scripts
parent44715883e18c1f1558b1281b60d616a3f6b9fddf (diff)
downloadcoreutils-c53c5e2395d206a1ab2c821eed8414270fbc07b4.tar.xz
maint: prevent trailing period at first line of a commit message
* scripts/git-hooks/commit-msg (bad_first_line): Return an error message if the first line of a commit message ends with a period.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/git-hooks/commit-msg3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg
index 173210380..3e91e8ea4 100755
--- a/scripts/git-hooks/commit-msg
+++ b/scripts/git-hooks/commit-msg
@@ -62,6 +62,9 @@ sub bad_first_line($)
$line =~ /:/
or return 'missing colon on first line of log message';
+ $line =~ /\.$/
+ and return 'do not use a period "." at the end of the first line';
+
# The token(s) before the colon on the first line must be on our list
# Tokens may be space- or comma-separated.
(my $pre_colon = $line) =~ s/:.*//;