diff options
| author | Po Lu | 2025-02-17 22:08:16 +0800 |
|---|---|---|
| committer | Po Lu | 2025-02-17 22:43:36 +0800 |
| commit | ba6779ab2afcd3177c9c118a0383aa21ad1ab45f (patch) | |
| tree | 9acd1c90c2a09e91290e9a50e6fc81d13a12a04c /build-aux/git-hooks/commit-msg | |
| parent | d80ac0fbaa09826342a9818014ae950acc7c0c03 (diff) | |
| download | emacs-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-x | build-aux/git-hooks/commit-msg | 5 |
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++ } |