From d033a7af79080280a1bb4920a33640cdfa099d60 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 1 Nov 2014 15:23:43 +0000 Subject: [PATCH] strengthened commit message check --- codepot/etc/pre-commit.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/codepot/etc/pre-commit.in b/codepot/etc/pre-commit.in index f2c5d8aa..bea338f8 100644 --- a/codepot/etc/pre-commit.in +++ b/codepot/etc/pre-commit.in @@ -122,11 +122,18 @@ sub check_commit_message my $log = $txn->prop ('svn:log'); $log =~ s/^\s+|\s+$//g; # trim leading spaces and trailing spaces - if (length($log) < $minlen) { + if (length($log) < $minlen) + { print (STDERR "Commit message too short. must be >= $minlen\n"); return 0; } + if ($log =~ /^[[:punct:][:space:]]+$/) + { + print (STDERR "Commit message meaningless\n"); + return 0; + } + return 1; }