summary refs log tree commit diff
path: root/githooks
diff options
context:
space:
mode:
Diffstat (limited to 'githooks')
-rwxr-xr-xgithooks/commit-msg2
1 files changed, 1 insertions, 1 deletions
diff --git a/githooks/commit-msg b/githooks/commit-msg
index 985819c..2279462 100755
--- a/githooks/commit-msg
+++ b/githooks/commit-msg
@@ -6,7 +6,7 @@ set -euo pipefail
 change_id=$(head -c32 /dev/urandom | git hash-object --stdin)
 
 cut_line='------------------------ >8 ------------------------'
-if [ $(< "$1" sed -e "/^# ${cut_line}$/Q" | git stripspace --strip-comments | wc -c) -eq 0 ]; then
+if [ $(< "$1" sed -ne "/^# ${cut_line}$/q;p" | git stripspace --strip-comments | wc -c) -eq 0 ]; then
     # don't inhibit "Aborting commit due to empty commit message"
     exit 0
 fi