]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
scripts: commit-msg: recognize Git cut_lines
authorArsen Arsenović <arsen@aarsen.me>
Sun, 20 Nov 2022 11:25:12 +0000 (12:25 +0100)
committerPádraig Brady <P@draigBrady.com>
Sun, 20 Nov 2022 18:17:47 +0000 (18:17 +0000)
This prevents spurious failures from happening when someone sets
commit.verbose or passes -v to commit.

scripts/git-hooks/commit-msg

index 8b065592019057bca082445002be9eddaa2416be..da094c95af4c378be7b29b92dd34eaa978244f58 100755 (executable)
@@ -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";