diff options
author | Peter Wu <[email protected]> | 2015-07-09 15:11:33 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-07-23 13:05:52 +0000 |
commit | 157c8be183153ff588f98874a3205aa483d0fd23 (patch) | |
tree | 2833d4a93e660a2da84f29ffc20d512b1965f705 /build-aux | |
parent | Add option --lib-version to gpgme-tool. (diff) | |
download | gpgme-157c8be183153ff588f98874a3205aa483d0fd23.tar.gz gpgme-157c8be183153ff588f98874a3205aa483d0fd23.zip |
build: ignore scissor line for the commit-msg hook
* build-aux/git-hooks/commit-msg: Stop processing more lines when the
scissor line is encountered.
--
This allows the command `git commit -v` to work even if the code is
longer than 72 characters. Note that comments are already ignored by the
previous line.
Signed-off-by: Peter Wu <[email protected]>
Diffstat (limited to 'build-aux')
-rwxr-xr-x | build-aux/git-hooks/commit-msg | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index 5a697c7a..3ca918b2 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg @@ -86,11 +86,17 @@ sub check_msg($$) 2 <= @line && length $line[1] and return 'second line must be empty'; + # See git-commit(1), this is the --cleanup=scissors option. Everything + # after and including this line gets ignored. + my $marker = '# ------------------------ >8 ------------------------'; + # Limit line length to allow for the ChangeLog's leading TAB. foreach my $line (@line) { 72 < length $line && $line =~ /^[^#]/ and return 'line longer than 72 characters'; + + last if $line eq $marker; } return ''; |