diff options
| author | Paul Eggert | 2015-04-10 19:12:16 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-04-10 19:12:16 -0700 |
| commit | 68a74dd12ad8c28bfe6fb2c0232a7beea548c4c6 (patch) | |
| tree | f2050586bd62f734d1c714d284a7f1dacbdd110d | |
| parent | 42142f089d5ff62729a76c903029f9b0349d0dba (diff) | |
| download | emacs-68a74dd12ad8c28bfe6fb2c0232a7beea548c4c6.tar.gz emacs-68a74dd12ad8c28bfe6fb2c0232a7beea548c4c6.zip | |
Fix commit-msg to handle scissors lines
* build-aux/git-hooks/commit-msg:
Ignore every line after a scissors line, such as a line generated
by 'git commit -v'. Problem reported by Johan Bockgård in:
http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00580.html
| -rwxr-xr-x | build-aux/git-hooks/commit-msg | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index 5b07b6c5d65..ea8d9098b37 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg | |||
| @@ -62,7 +62,13 @@ exec $awk -v at_sign="$at_sign" -v cent_sign="$cent_sign" ' | |||
| 62 | } | 62 | } |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | /^#/ { next } | 65 | /^#/ { |
| 66 | # Ignore every line after a scissors line. | ||
| 67 | if (/^# *---* *(>[8%]|[8%]<) *---* *$/) { exit } | ||
| 68 | |||
| 69 | # Ignore comment lines. | ||
| 70 | next | ||
| 71 | } | ||
| 66 | 72 | ||
| 67 | !/^.*$/ { | 73 | !/^.*$/ { |
| 68 | print "Invalid character (not UTF-8) in commit message" | 74 | print "Invalid character (not UTF-8) in commit message" |