summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-11-23 09:02:51 +0100
committerJim Meyering <meyering@redhat.com>2011-11-23 09:05:08 +0100
commit0fd74a564eec0d1bd152ca7b6d5967ff571be66a (patch)
tree8e43301534929a890562d886cb1564d03dddf694 /scripts
parent3d213a17fac0a33d9845d1511d568a68ae2035ec (diff)
downloadcoreutils-0fd74a564eec0d1bd152ca7b6d5967ff571be66a.tar.xz
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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/git-hooks/commit-msg2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg
index 7d0891efc..22f595ff2 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';
}