diff options
| author | Paul Eggert | 2015-03-29 13:03:55 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-03-29 13:07:21 -0700 |
| commit | 6b7dd51e1210e962c83b1337c8fa59f1ab65c735 (patch) | |
| tree | f8210b9afa45cf5d0ce56806be5bd5f4f7121b9c /build-aux/git-hooks/commit-msg | |
| parent | d193f52f78ff3568ad1e98e5443864ff47b6cf3a (diff) | |
| download | emacs-6b7dd51e1210e962c83b1337c8fa59f1ab65c735.tar.gz emacs-6b7dd51e1210e962c83b1337c8fa59f1ab65c735.zip | |
Fix 'commit-msg' to cite 'CONTRIBUTE'
As suggested in:
http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00947.html
Also, have the two files match better.
* CONTRIBUTE: Match what's in build-aux/git-hooks/commit-msg.
* build-aux/git-hooks/commit-msg: Mention 'CONTRIBUTE'.
Diffstat (limited to 'build-aux/git-hooks/commit-msg')
| -rwxr-xr-x | build-aux/git-hooks/commit-msg | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index 31df5ce034a..13a05351ded 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg | |||
| @@ -63,7 +63,7 @@ exec $awk ' | |||
| 63 | /^#/ { next } | 63 | /^#/ { next } |
| 64 | 64 | ||
| 65 | !/^.*$/ { | 65 | !/^.*$/ { |
| 66 | print "Invalid character (not UTF-8) in commit message" | 66 | print "Invalid character (not UTF-8) in commit message; see 'CONTRIBUTE'" |
| 67 | status = 1 | 67 | status = 1 |
| 68 | } | 68 | } |
| 69 | 69 | ||
| @@ -77,13 +77,13 @@ exec $awk ' | |||
| 77 | sub(/^squash! /, "") | 77 | sub(/^squash! /, "") |
| 78 | 78 | ||
| 79 | if ($0 ~ "^" space) { | 79 | if ($0 ~ "^" space) { |
| 80 | print "White space at start of commit message'\''s first line" | 80 | print "White space at start of commit message'\''s first line; see 'CONTRIBUTE'" |
| 81 | status = 1 | 81 | status = 1 |
| 82 | } | 82 | } |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | nlines == 2 && $0 ~ non_space { | 85 | nlines == 2 && $0 ~ non_space { |
| 86 | print "Nonempty second line in commit message" | 86 | print "Nonempty second line in commit message; see 'CONTRIBUTE'" |
| 87 | status = 1 | 87 | status = 1 |
| 88 | } | 88 | } |
| 89 | 89 | ||
| @@ -97,28 +97,28 @@ exec $awk ' | |||
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | 78 < length && $0 ~ space { | 99 | 78 < length && $0 ~ space { |
| 100 | print "Line longer than 78 characters in commit message" | 100 | print "Line longer than 78 characters in commit message; see 'CONTRIBUTE'" |
| 101 | status = 1 | 101 | status = 1 |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | 140 < length { | 104 | 140 < length { |
| 105 | print "Word longer than 140 characters in commit message" | 105 | print "Word longer than 140 characters in commit message; see 'CONTRIBUTE'" |
| 106 | status = 1 | 106 | status = 1 |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | /^Signed-off-by: / { | 109 | /^Signed-off-by: / { |
| 110 | print "'\''Signed-off-by:'\'' in commit message" | 110 | print "'\''Signed-off-by:'\'' in commit message; see 'CONTRIBUTE'" |
| 111 | status = 1 | 111 | status = 1 |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | $0 ~ non_print { | 114 | $0 ~ non_print { |
| 115 | print "Unprintable character in commit message" | 115 | print "Unprintable character in commit message; see 'CONTRIBUTE'" |
| 116 | status = 1 | 116 | status = 1 |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | END { | 119 | END { |
| 120 | if (nlines == 0) { | 120 | if (nlines == 0) { |
| 121 | print "Empty commit message" | 121 | print "Empty commit message; see 'CONTRIBUTE'" |
| 122 | status = 1 | 122 | status = 1 |
| 123 | } | 123 | } |
| 124 | exit status | 124 | exit status |