Skip to content

Commit ba6779a

Browse files
author
Po Lu
committed
; 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.
1 parent d80ac0f commit ba6779a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

build-aux/git-hooks/commit-msg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ exec $awk \
9292
status = 1
9393
}
9494
95+
/(^|[^\\])`[^'\''`]+`/ {
96+
print "Markdown-style quotes in commit message"
97+
status = 1
98+
}
99+
95100
nlines == 0 && $0 !~ non_space { next }
96101
97102
{ nlines++ }

build-aux/git-hooks/prepare-commit-msg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ exec $awk "
4040
print \"'Signed-off-by:' in commit message\"
4141
status = 1
4242
}
43-
/(^|[^\\\\])\`[^'\`]+\`/ {
44-
print \"Markdown-style quotes in commit message\"
45-
status = 1
46-
}
4743
END {
4844
if (status != 0) {
4945
print \"Commit aborted; please see the file 'CONTRIBUTE'\"

0 commit comments

Comments
 (0)