From 8613d35be6c21a380e647ce228973bdfb7ea462b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Date: Sun, 20 Nov 2022 12:25:12 +0100 Subject: scripts: commit-msg: recognize Git cut_lines This prevents spurious failures from happening when someone sets commit.verbose or passes -v to commit. --- scripts/git-hooks/commit-msg | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') 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"; -- cgit v1.2.1