From: Bernhard Voelker Date: Wed, 13 Feb 2013 23:28:06 +0000 (+0100) Subject: maint: prevent trailing period at first line of a commit message X-Git-Tag: v8.22~195 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c53c5e2395d206a1ab2c821eed8414270fbc07b4;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg index 1732103804..3e91e8ea41 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/:.*//;