From ef83a9b1f33c5b461c2ac51cb2417facf9bd0d57 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 4 Aug 2015 11:24:08 +0000 Subject: [PATCH] changed the pre-commit script further to exclude repeated spaces in getting the message length --- codepot/etc/pre-commit.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codepot/etc/pre-commit.in b/codepot/etc/pre-commit.in index 9e33c3f5..7aaef6d5 100644 --- a/codepot/etc/pre-commit.in +++ b/codepot/etc/pre-commit.in @@ -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; }