aboutsummaryrefslogtreecommitdiffstats
path: root/CONTRIBUTE
diff options
context:
space:
mode:
authorEli Zaretskii2015-04-22 14:25:34 +0300
committerEli Zaretskii2015-04-22 14:25:34 +0300
commitc4e0ba51552ec773003f5f81a09132d729f812cc (patch)
tree7c5690b6ca538b19f59482e921dc52b03ad4106d /CONTRIBUTE
parent934968a2adea1b4a550f2a0d5a47fc5757bb9082 (diff)
downloademacs-c4e0ba51552ec773003f5f81a09132d729f812cc.tar.gz
emacs-c4e0ba51552ec773003f5f81a09132d729f812cc.zip
Minor edits in CONTRIBUTE
* CONTRIBUTE: Rearrange instructions about log messages. Use "Git" capitalized all over. Use 2 spaces between sentences.
Diffstat (limited to 'CONTRIBUTE')
-rw-r--r--CONTRIBUTE117
1 files changed, 64 insertions, 53 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE
index d0e3750dc9d..1e04e3bbac6 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -7,19 +7,22 @@ http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html
7* Information for Emacs Developers. 7* Information for Emacs Developers.
8 8
9An "Emacs Developer" is someone who contributes a lot of code or 9An "Emacs Developer" is someone who contributes a lot of code or
10documentation to the Emacs repository. Generally, they have write 10documentation to the Emacs repository. Generally, they have write
11access to the Emacs git repository on Savannah 11access to the Emacs git repository on Savannah
12https://savannah.gnu.org/git/?group=emacs. 12https://savannah.gnu.org/git/?group=emacs.
13 13
14** Write access to the Emacs repository. 14** Write access to the Emacs repository.
15 15
16Once you become a frequent contributor to Emacs, we can consider 16Once you become a frequent contributor to Emacs, we can consider
17giving you write access to the version-control repository. Request 17giving you write access to the version-control repository. Request
18access on the emacs-devel@gnu.org mailing list. 18access on the emacs-devel@gnu.org mailing list. Also, be sure to
19subscribe to the emacs-devel@gnu.org mailing list and include the
20"emacs-announce" topic, so that you get the announcements about
21feature freeze and other important events.
19 22
20** Using the Emacs repository 23** Using the Emacs repository
21 24
22Emacs uses git for the source code repository. 25Emacs uses Git for the source code repository.
23 26
24See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get 27See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get
25started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more 28started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more
@@ -28,16 +31,18 @@ advanced information.
28Alternately, see admin/notes/git-workflow. 31Alternately, see admin/notes/git-workflow.
29 32
30If committing changes written by someone else, make the commit in 33If committing changes written by someone else, make the commit in
31their name, not yours. git distinguishes between the author 34their name, not yours. Git distinguishes between the author
32and the committer; use the --author option on the commit command to 35and the committer; use the --author option on the commit command to
33specify the actual author; the committer defaults to you. 36specify the actual author; the committer defaults to you.
34 37
35** Commit messages 38** Commit messages
36 39
37When a release is prepared, the commit messages are used to generate 40Emacs development no longer stores descriptions of new changes in
38the ChangeLog file. So a typical patch does not touch any of the 41ChangeLog files. Instead, a single ChangeLog file is generated from
39ChangeLog files in the repository, but contains the ChangeLog entries 42the commit messages when a release is prepared. So changes you commit
40in its message. Here is an example commit message (indented): 43should not touch any of the ChangeLog files in the repository, but
44instead should contain the log entries in the commit message. Here is
45an example of a commit message (indented):
41 46
42 Deactivate shifted region 47 Deactivate shifted region
43 48
@@ -48,10 +53,17 @@ in its message. Here is an example commit message (indented):
48 * src/frame.c (Fhandle_switch_frame, Fselected_frame): 53 * src/frame.c (Fhandle_switch_frame, Fselected_frame):
49 Deactivate the mark. 54 Deactivate the mark.
50 55
51The general format is as follows. 56Below are some rules and recommendations for formatting commit
57messages:
52 58
53- Start with a single unindented summary line explaining the change, 59- Start with a single unindented summary line explaining the change;
54 then an empty line, then unindented ChangeLog entries. 60 do not end this line with a period. If that line starts with a
61 semi-colon and a space "; ", the log message will be ignored when
62 generating the ChangeLog file. Use this for minor commits that do
63 not need separate ChangeLog entries, such as changes in etc/NEWS.
64
65- After the summary line, there should be an empty line, then
66 unindented ChangeLog entries.
55 67
56- Limit lines in commit messages to 78 characters, unless they consist 68- Limit lines in commit messages to 78 characters, unless they consist
57 of a single word of at most 140 characters; this is enforced by a 69 of a single word of at most 140 characters; this is enforced by a
@@ -64,22 +76,37 @@ The general format is as follows.
64 file first line (starting with the asterisk). Then there is no 76 file first line (starting with the asterisk). Then there is no
65 individual files section. 77 individual files section.
66 78
67- Explaining the rationale for a design choice is best done in comments 79- If the commit has authors other than yourself, the commit message
68 in the source code. However, sometimes it is useful to describe just 80 should contain a separate line like the following:
69 the rationale for a change; that can be done in the commit message 81
70 between the summary line and the file entries. 82 Co-authored-by: Joe Schmoe <j.schmoe@example.org>
83
84- If the commit is a tiny change that is exempt from copyright paperwork,
85 the commit message should contain a separate line like the following:
86
87 Copyright-paperwork-exempt: yes
88
89- The commit message should contain "Bug#NNNNN" if it is related to
90 bug number NNNNN in the debbugs database. This string is often
91 parenthesized, as in "(Bug#19003)".
71 92
72- Commit messages should contain only printable UTF-8 characters. 93- Commit messages should contain only printable UTF-8 characters.
73 94
74- Commit messages should not contain the "Signed-off-by:" lines that 95- Commit messages should not contain the "Signed-off-by:" lines that
75 are used in some other projects. 96 are used in some other projects.
76 97
98- Explaining the rationale for a design choice is best done in comments
99 in the source code. However, sometimes it is useful to describe just
100 the rationale for a change; that can be done in the commit message
101 between the summary line and the file entries.
102
77- Emacs generally follows the GNU coding standards when it comes to 103- Emacs generally follows the GNU coding standards when it comes to
78 ChangeLogs: 104 ChangeLogs:
79 http://www.gnu.org/prep/standards/html_node/Change-Logs.html . One 105 http://www.gnu.org/prep/standards/html_node/Change-Logs.html or
80 exception is that we still sometimes quote `like-this' (as the 106 "(info (standards)Change Logs"). One exception is that we still
81 standards used to recommend) rather than 'like-this' (as they do 107 sometimes quote `like-this' (as the standards used to recommend)
82 now), because `...' is so widely used elsewhere in Emacs. 108 rather than 'like-this' (as they do now), because `...' is so widely
109 used elsewhere in Emacs.
83 110
84- Some of the rules in the GNU coding standards section 5.2 111- Some of the rules in the GNU coding standards section 5.2
85 "Commenting Your Work" also apply to ChangeLog entries: they must be 112 "Commenting Your Work" also apply to ChangeLog entries: they must be
@@ -102,27 +129,15 @@ The general format is as follows.
102 129
103 (Rather than anything involving "ditto" and suchlike.) 130 (Rather than anything involving "ditto" and suchlike.)
104 131
105- If the commit has authors other than yourself, the commit message 132- There is no standard or recommended way to identify revisions in
106 should contain a separate line like the following: 133 ChangeLog entries. Using Git SHA1 values limits the usability of
107 134 the references to Git, and will become much less useful if Emacs
108 Co-authored-by: Joe Schmoe <j.schmoe@example.org> 135 switches to a different VCS. So we recommend against that.
109
110- If the commit is a tiny change that is exempt from copyright paperwork,
111 the commit message should contain a separate line like the following:
112
113 Copyright-paperwork-exempt: yes
114
115- The commit message should contain "Bug#NNNNN" if it is related to
116 bug number NNNNN in the debbugs database. This string is often
117 parenthesized, as in "(Bug#19003)".
118
119- In ChangeLog entries, there is no standard or recommended way to
120 identify revisions.
121 136
122 One way to identify revisions is by quoting their summary line. 137 One way to identify revisions is by quoting their summary line.
123 Another is with an action stamp - an RFC3339 date followed by ! 138 Another is with an action stamp - an RFC3339 date followed by !
124 followed by the committer's email - for example, 139 followed by the committer's email - for example,
125 "2014-01-16T05:43:35Z!esr@thyrsus.com". Often, "my previous commit" 140 "2014-01-16T05:43:35Z!esr@thyrsus.com". Often, "my previous commit"
126 will suffice. 141 will suffice.
127 142
128- There is no need to mention files such as NEWS, MAINTAINERS, and 143- There is no need to mention files such as NEWS, MAINTAINERS, and
@@ -130,12 +145,6 @@ The general format is as follows.
130 'configure', in the ChangeLog entry. "There is no need" means you 145 'configure', in the ChangeLog entry. "There is no need" means you
131 don't have to, but you can if you want to. 146 don't have to, but you can if you want to.
132 147
133- If a commit message's first line starts with "; ", the message is
134 ignored when generating ChangeLog history files via 'make ChangeLog'
135 or via 'make change-history'. You can use "; " for minor commits
136 that do not need separate ChangeLog entries, as well as commits that
137 only modify files that don't need these entries at all.
138
139** Generating ChangeLog entries 148** Generating ChangeLog entries
140 149
141- You can use various Emacs functions to ease the process of writing 150- You can use various Emacs functions to ease the process of writing
@@ -156,7 +165,7 @@ The general format is as follows.
156 with Emacs commands like 'C-x 4 a', and commit the change using the 165 with Emacs commands like 'C-x 4 a', and commit the change using the
157 shell command 'vc-dwim --commit'. Type 'vc-dwim --help' for more. 166 shell command 'vc-dwim --commit'. Type 'vc-dwim --help' for more.
158 167
159** branches 168** Branches
160 169
161Development normally takes places on the trunk. 170Development normally takes places on the trunk.
162Sometimes specialized features are developed on separate branches 171Sometimes specialized features are developed on separate branches
@@ -167,9 +176,9 @@ Development is discussed on the emacs-devel mailing list.
167Sometime before the release of a new major version of Emacs a "feature 176Sometime before the release of a new major version of Emacs a "feature
168freeze" is imposed on the trunk, to prepare for creating a release 177freeze" is imposed on the trunk, to prepare for creating a release
169branch. No new features may be added to the trunk after this point, 178branch. No new features may be added to the trunk after this point,
170until the release branch is created. Announcements about the freeze 179until the release branch is created. Announcements about the freeze
171(and other important events) are made on the info-gnu-emacs mailing 180(and other important events) are made on the emacs-devel mailing
172list, and not anywhere else. 181list under the "emacs-announce" topic, and not anywhere else.
173 182
174The trunk branch is named "master" in git; release branches are named 183The trunk branch is named "master" in git; release branches are named
175"emacs-nn" where "nn" is the major version. 184"emacs-nn" where "nn" is the major version.
@@ -188,13 +197,13 @@ then exclude that commit from the merge to trunk.
188 197
189** Other process information 198** Other process information
190 199
191See all the files in admin/notes/* . In particular, see 200See all the files in admin/notes/* . In particular, see
192admin/notes/newfile, see admin/notes/repo. 201admin/notes/newfile, see admin/notes/repo.
193 202
194*** git vs rename 203*** git vs rename
195 204
196git does not explicitly represent a file renaming; it uses a percent 205Git does not explicitly represent a file renaming; it uses a percent
197changed heuristic to deduce that a file was renamed. So if you are 206changed heuristic to deduce that a file was renamed. So if you are
198planning to make extensive changes to a file after renaming it (or 207planning to make extensive changes to a file after renaming it (or
199moving it to another directory), you should: 208moving it to another directory), you should:
200 209
@@ -205,7 +214,7 @@ moving it to another directory), you should:
205- make other changes 214- make other changes
206 215
207- merge the feature branch to trunk, _not_ squashing the commits into 216- merge the feature branch to trunk, _not_ squashing the commits into
208 one. The commit message on this merge should summarize the renames 217 one. The commit message on this merge should summarize the renames
209 and all the changes. 218 and all the changes.
210 219
211** Emacs Mailing lists. 220** Emacs Mailing lists.
@@ -232,7 +241,7 @@ Doc-strings should be updated together with the code.
232Think about whether your change requires updating the manuals. If you 241Think about whether your change requires updating the manuals. If you
233know it does not, mark the NEWS entry with "---". If you know 242know it does not, mark the NEWS entry with "---". If you know
234that *all* the necessary documentation updates have been made, mark 243that *all* the necessary documentation updates have been made, mark
235the entry with "+++". Otherwise do not mark it. 244the entry with "+++". Otherwise do not mark it.
236 245
237Please see (info "(elisp)Documentation Tips") or 246Please see (info "(elisp)Documentation Tips") or
238https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html 247https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html
@@ -258,7 +267,9 @@ top-level directory. Most tests are in the directory
258 267
259The best way to understand Emacs Internals is to read the code, 268The best way to understand Emacs Internals is to read the code,
260but the nodes "Tips" and "GNU Emacs Internals" in the Appendix 269but the nodes "Tips" and "GNU Emacs Internals" in the Appendix
261of the Emacs Lisp Reference Manual may also help. 270of the Emacs Lisp Reference Manual may also help. Some source files,
271such as xdisp.c, have large commentaries describing the design and
272implementation in more detail.
262 273
263The file etc/DEBUG describes how to debug Emacs bugs. 274The file etc/DEBUG describes how to debug Emacs bugs.
264 275