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
This commit is contained in:
parent
42142f089d
commit
68a74dd12a
1 changed files with 7 additions and 1 deletions
|
@ -62,7 +62,13 @@ exec $awk -v at_sign="$at_sign" -v cent_sign="$cent_sign" '
|
|||
}
|
||||
}
|
||||
|
||||
/^#/ { next }
|
||||
/^#/ {
|
||||
# Ignore every line after a scissors line.
|
||||
if (/^# *---* *(>[8%]|[8%]<) *---* *$/) { exit }
|
||||
|
||||
# Ignore comment lines.
|
||||
next
|
||||
}
|
||||
|
||||
!/^.*$/ {
|
||||
print "Invalid character (not UTF-8) in commit message"
|
||||
|
|
Loading…
Add table
Reference in a new issue