mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-03 19:03:24 +00:00
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'.
This commit is contained in:
parent
d193f52f78
commit
6b7dd51e12
3 changed files with 28 additions and 13 deletions
16
CONTRIBUTE
16
CONTRIBUTE
|
@ -37,16 +37,17 @@ specify the actual author; the committer defaults to you.
|
||||||
When using git, commit messages should use ChangeLog format, with the
|
When using git, commit messages should use ChangeLog format, with the
|
||||||
following modifications:
|
following modifications:
|
||||||
|
|
||||||
- Add a single short line explaining the change, then an empty line,
|
- Start with a single unindented summary line explaining the change,
|
||||||
then unindented ChangeLog entries.
|
then an empty line, then unindented ChangeLog entries.
|
||||||
|
|
||||||
You can use various Emacs functions to ease this process; see (info
|
You can use various Emacs functions to ease this process; see (info
|
||||||
"(emacs)Change Log Commands") or
|
"(emacs)Change Log Commands") or
|
||||||
http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html.
|
http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html.
|
||||||
|
|
||||||
- The summary line is limited to 72 characters (enforced by a commit
|
- Limit lines in commit messages to 78 characters, unless they consist
|
||||||
hook). If you have trouble making that a good summary, add a
|
of a single word of at most 140 characters. If you have trouble
|
||||||
paragraph below it, before the individual file descriptions.
|
fitting the summary into 78 characters, add a summarizing paragraph
|
||||||
|
below the empty line and before the individual file descriptions.
|
||||||
|
|
||||||
- If only a single file is changed, the summary line can be the normal
|
- If only a single file is changed, the summary line can be the normal
|
||||||
file first line (starting with the asterisk). Then there is no
|
file first line (starting with the asterisk). Then there is no
|
||||||
|
@ -57,6 +58,11 @@ following modifications:
|
||||||
the rationale for a change; that can be done in the commit message
|
the rationale for a change; that can be done in the commit message
|
||||||
between the summary line and the file entries.
|
between the summary line and the file entries.
|
||||||
|
|
||||||
|
- Commit messages should contain only printable UTF-8 characters.
|
||||||
|
|
||||||
|
- Commit messages should not contained the "Signed-off-by:" lines that
|
||||||
|
are used in some other projects.
|
||||||
|
|
||||||
** ChangeLog notes
|
** ChangeLog notes
|
||||||
|
|
||||||
- Emacs generally follows the GNU coding standards when it comes to
|
- Emacs generally follows the GNU coding standards when it comes to
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
2015-03-29 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
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'.
|
||||||
|
|
||||||
2015-03-23 Andreas Schwab <schwab@suse.de>
|
2015-03-23 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
* configure.ac: Fix jpeg version check to work with gcc >= 5.
|
* configure.ac: Fix jpeg version check to work with gcc >= 5.
|
||||||
|
|
|
@ -63,7 +63,7 @@ exec $awk '
|
||||||
/^#/ { next }
|
/^#/ { next }
|
||||||
|
|
||||||
!/^.*$/ {
|
!/^.*$/ {
|
||||||
print "Invalid character (not UTF-8) in commit message"
|
print "Invalid character (not UTF-8) in commit message; see 'CONTRIBUTE'"
|
||||||
status = 1
|
status = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,13 +77,13 @@ exec $awk '
|
||||||
sub(/^squash! /, "")
|
sub(/^squash! /, "")
|
||||||
|
|
||||||
if ($0 ~ "^" space) {
|
if ($0 ~ "^" space) {
|
||||||
print "White space at start of commit message'\''s first line"
|
print "White space at start of commit message'\''s first line; see 'CONTRIBUTE'"
|
||||||
status = 1
|
status = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nlines == 2 && $0 ~ non_space {
|
nlines == 2 && $0 ~ non_space {
|
||||||
print "Nonempty second line in commit message"
|
print "Nonempty second line in commit message; see 'CONTRIBUTE'"
|
||||||
status = 1
|
status = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,28 +97,28 @@ exec $awk '
|
||||||
}
|
}
|
||||||
|
|
||||||
78 < length && $0 ~ space {
|
78 < length && $0 ~ space {
|
||||||
print "Line longer than 78 characters in commit message"
|
print "Line longer than 78 characters in commit message; see 'CONTRIBUTE'"
|
||||||
status = 1
|
status = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
140 < length {
|
140 < length {
|
||||||
print "Word longer than 140 characters in commit message"
|
print "Word longer than 140 characters in commit message; see 'CONTRIBUTE'"
|
||||||
status = 1
|
status = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
/^Signed-off-by: / {
|
/^Signed-off-by: / {
|
||||||
print "'\''Signed-off-by:'\'' in commit message"
|
print "'\''Signed-off-by:'\'' in commit message; see 'CONTRIBUTE'"
|
||||||
status = 1
|
status = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
$0 ~ non_print {
|
$0 ~ non_print {
|
||||||
print "Unprintable character in commit message"
|
print "Unprintable character in commit message; see 'CONTRIBUTE'"
|
||||||
status = 1
|
status = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
END {
|
END {
|
||||||
if (nlines == 0) {
|
if (nlines == 0) {
|
||||||
print "Empty commit message"
|
print "Empty commit message; see 'CONTRIBUTE'"
|
||||||
status = 1
|
status = 1
|
||||||
}
|
}
|
||||||
exit status
|
exit status
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue