changed the pre-commit script to exclude repeated punctuation symbols in getting the message length

This commit is contained in:
hyung-hwan 2015-08-04 11:15:59 +00:00
parent 5541c1913b
commit a0c5fb4dbd

View File

@ -167,6 +167,8 @@ sub check_commit_message
} }
my $log = $txn->prop ('svn:log'); my $log = $txn->prop ('svn:log');
$log =~ s/([[:punct:]]{1,2}\s+){3,}/ /g;
$log =~ s/[[:punct:]]{3,}/ /g;
$log =~ s/^\s+|\s+$//g; # trim leading spaces and trailing spaces $log =~ s/^\s+|\s+$//g; # trim leading spaces and trailing spaces
if (length($log) < $minlen) if (length($log) < $minlen)
{ {