changed the pre-commit script further to exclude repeated spaces in getting the message length

This commit is contained in:
hyung-hwan 2015-08-04 11:24:08 +00:00
parent a0c5fb4dbd
commit ef83a9b1f3

View File

@ -167,12 +167,13 @@ sub check_commit_message
}
my $log = $txn->prop ('svn:log');
$log =~ s/\s{2,}/ /g;
$log =~ s/([[:punct:]]{1,2}\s+){3,}/ /g;
$log =~ s/[[:punct:]]{3,}/ /g;
$log =~ s/^\s+|\s+$//g; # trim leading spaces and trailing spaces
if (length($log) < $minlen)
{
print (STDERR "Commit message too short. must be >= $minlen\n");
print (STDERR "Commit message too short. meaningful part must be >= $minlen\n");
return 0;
}