aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux/git-hooks/commit-msg
diff options
context:
space:
mode:
authorPo Lu2025-02-17 22:08:16 +0800
committerPo Lu2025-02-17 22:43:36 +0800
commitba6779ab2afcd3177c9c118a0383aa21ad1ab45f (patch)
tree9acd1c90c2a09e91290e9a50e6fc81d13a12a04c /build-aux/git-hooks/commit-msg
parentd80ac0fbaa09826342a9818014ae950acc7c0c03 (diff)
downloademacs-ba6779ab2afcd3177c9c118a0383aa21ad1ab45f.tar.gz
emacs-ba6779ab2afcd3177c9c118a0383aa21ad1ab45f.zip
; Move Markdown quotation detection to commit-msg hook
* build-aux/git-hooks/prepare-commit-msg: Don't detect markdown quotes here... * build-aux/git-hooks/commit-msg: but here, to intercept interactively composed log messages.
Diffstat (limited to 'build-aux/git-hooks/commit-msg')
-rwxr-xr-xbuild-aux/git-hooks/commit-msg5
1 files changed, 5 insertions, 0 deletions
diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg
index a8ae70d49d3..a52862bf745 100755
--- a/build-aux/git-hooks/commit-msg
+++ b/build-aux/git-hooks/commit-msg
@@ -92,6 +92,11 @@ exec $awk \
92 status = 1 92 status = 1
93 } 93 }
94 94
95 /(^|[^\\])`[^'\''`]+`/ {
96 print "Markdown-style quotes in commit message"
97 status = 1
98 }
99
95 nlines == 0 && $0 !~ non_space { next } 100 nlines == 0 && $0 !~ non_space { next }
96 101
97 { nlines++ } 102 { nlines++ }