; 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.
This commit is contained in:
Po Lu 2025-02-17 22:08:16 +08:00
parent d80ac0fbaa
commit ba6779ab2a
2 changed files with 5 additions and 4 deletions

View file

@ -92,6 +92,11 @@ exec $awk \
status = 1
}
/(^|[^\\])`[^'\''`]+`/ {
print "Markdown-style quotes in commit message"
status = 1
}
nlines == 0 && $0 !~ non_space { next }
{ nlines++ }

View file

@ -40,10 +40,6 @@ exec $awk "
print \"'Signed-off-by:' in commit message\"
status = 1
}
/(^|[^\\\\])\`[^'\`]+\`/ {
print \"Markdown-style quotes in commit message\"
status = 1
}
END {
if (status != 0) {
print \"Commit aborted; please see the file 'CONTRIBUTE'\"