mirror of
https://github.com/coreutils/coreutils.git
synced 2024-12-03 06:53:31 +08:00
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.
This commit is contained in:
parent
44715883e1
commit
c53c5e2395
@ -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/:.*//;
|
||||
|
Loading…
Reference in New Issue
Block a user