summaryrefslogtreecommitdiff
path: root/.git-hooks
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-03 13:55:08 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-12-03 20:21:33 +0100
commit8eb8d64fa113091d3d4dec960faabf365d263149 (patch)
tree5ec0c9aaee36bc3316142fcbdb7edba778f09f4f /.git-hooks
parent4b8ed95e336257e4821985435b5c59faa59e4588 (diff)
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 <sbergman@redhat.com>
Diffstat (limited to '.git-hooks')
-rwxr-xr-x.git-hooks/commit-msg2
1 files changed, 1 insertions, 1 deletions
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