From 8eb8d64fa113091d3d4dec960faabf365d263149 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 3 Dec 2019 13:55:08 +0100 Subject: [PATCH] Don't count terminating newline when determining line length Change-Id: I3a5d306f32697e160f008e73de38fc53f2f1dbda Reviewed-on: https://gerrit.libreoffice.org/84349 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- .git-hooks/commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.git-hooks/commit-msg b/.git-hooks/commit-msg index 64fb7924956b..2c788fb0f622 100755 --- a/.git-hooks/commit-msg +++ b/.git-hooks/commit-msg @@ -41,7 +41,7 @@ fi # ...and that it is not too long -len="`head -n 1 $1 | wc -c`" +len="`head -n 1 $1 | tr -d '\n' | wc -c`" if [ "$len" -gt 79 ] ; then abort "$1" "The first line is $len characters, please try to fit into 79 characters." fi