From: Jim Meyering Date: Wed, 23 Nov 2011 08:02:51 +0000 (+0100) Subject: scripts: commit-msg: tweak 72-column test to avoid a false-positive X-Git-Tag: v8.15~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fd74a564eec0d1bd152ca7b6d5967ff571be66a;p=thirdparty%2Fcoreutils.git scripts: commit-msg: tweak 72-column test to avoid a false-positive * scripts/git-hooks/commit-msg: Don't warn about a line that is longer than 72 if it is a comment. Git-generated comments would occasionally trigger this. --- diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg index 7d0891efc2..22f595ff2c 100755 --- a/scripts/git-hooks/commit-msg +++ b/scripts/git-hooks/commit-msg @@ -101,7 +101,7 @@ sub check_msg($$) # Limit line length to allow for the ChangeLog's leading TAB. foreach my $line (@line) { - 72 < length $line + 72 < length $line && $line =~ /^[^#]/ and return 'line longer than 72'; }