1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; 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 status = 1
} }
/(^|[^\\])`[^'\''`]+`/ {
print "Markdown-style quotes in commit message"
status = 1
}
nlines == 0 && $0 !~ non_space { next } nlines == 0 && $0 !~ non_space { next }
{ nlines++ } { nlines++ }

View file

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