summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorArsen Arsenović <arsen@aarsen.me>2022-11-20 12:25:12 +0100
committerPádraig Brady <P@draigBrady.com>2022-11-20 18:17:47 +0000
commit8613d35be6c21a380e647ce228973bdfb7ea462b (patch)
tree12b1c8ba9619b1a6a6f0e760c0924e9d9fdbdca7 /scripts
parent7bb940ccedb722dedf8a8f9fd1c7dd2225252824 (diff)
downloadcoreutils-8613d35be6c21a380e647ce228973bdfb7ea462b.tar.gz
scripts: commit-msg: recognize Git cut_lines
This prevents spurious failures from happening when someone sets commit.verbose or passes -v to commit.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/git-hooks/commit-msg1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg
index 8b0655920..da094c95a 100755
--- a/scripts/git-hooks/commit-msg
+++ b/scripts/git-hooks/commit-msg
@@ -120,6 +120,7 @@ sub check_msg($$)
my $max_len = 72;
foreach my $line (@line)
{
+ last if $line =~ '.*-{24} >8 -{24}$';
my $len = length $line;
$max_len < $len && $line =~ /^[^#]/
and return "line length ($len) greater than than max: $max_len";