* scripts/git-hooks/commit-msg (bad_first_line): Allow spaces following
commas in the first line of commit messages.
---
scripts/git-hooks/commit-msg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg
index bcf7ecaa7..3313bb7d3 100755
--- a/scripts/git-hooks/commit-msg
+++ b/scripts/git-hooks/commit-msg
@@ -78,7 +78,7 @@ sub bad_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/:.*//;
- my @word = split (/[ ,]/, $pre_colon);
+ my @word = split /(?:, ?| )/, $pre_colon;
my @bad = grep !/$valid_regex/, @word;
@bad
and return 'invalid first word(s) of summary line: ' . join (', ', @bad);
--
2.56.0