]> code.delx.au - gnu-emacs/blob - CONTRIBUTE
Merge from origin/emacs-24
[gnu-emacs] / CONTRIBUTE
1 This file contains information on Emacs developer processes.
2
3 For information on contributing to Emacs as a non-developer, see
4 (info "(emacs)Contributing") or
5 http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html
6
7 * Information for Emacs Developers.
8
9 An "Emacs Developer" is someone who contributes a lot of code or
10 documentation to the Emacs repository. Generally, they have write
11 access to the Emacs git repository on Savannah
12 https://savannah.gnu.org/git/?group=emacs.
13
14 ** Write access to the Emacs repository.
15
16 Once you become a frequent contributor to Emacs, we can consider
17 giving you write access to the version-control repository. Request
18 access on the emacs-devel@gnu.org mailing list.
19
20 ** Using the Emacs repository
21
22 Emacs uses git for the source code repository.
23
24 See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get
25 started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more
26 advanced information.
27
28 Alternately, see admin/notes/git-workflow.
29
30 If committing changes written by someone else, make the ChangeLog
31 entry in their name, not yours. git distinguishes between the author
32 and the committer; use the --author option on the commit command to
33 specify the actual author; the committer defaults to you.
34
35 ** commit messages
36
37 When using git, commit messages should use ChangeLog format, with the
38 following modifications:
39
40 - Start with a single unindented summary line explaining the change,
41 then an empty line, then unindented ChangeLog entries.
42
43 You can use various Emacs functions to ease this process; see (info
44 "(emacs)Change Log Commands") or
45 http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html.
46
47 - Limit lines in commit messages to 78 characters, unless they consist
48 of a single word of at most 140 characters. If you have trouble
49 fitting the summary into 78 characters, add a summarizing paragraph
50 below the empty line and before the individual file descriptions.
51
52 - If only a single file is changed, the summary line can be the normal
53 file first line (starting with the asterisk). Then there is no
54 individual files section.
55
56 - Explaining the rationale for a design choice is best done in comments
57 in the source code. However, sometimes it is useful to describe just
58 the rationale for a change; that can be done in the commit message
59 between the summary line and the file entries.
60
61 - Commit messages should contain only printable UTF-8 characters.
62
63 - Commit messages should not contain the "Signed-off-by:" lines that
64 are used in some other projects.
65
66 ** ChangeLog notes
67
68 - Emacs generally follows the GNU coding standards when it comes to
69 ChangeLogs:
70 http://www.gnu.org/prep/standards/html_node/Change-Logs.html . One
71 exception is that we still sometimes quote `like-this' (as the
72 standards used to recommend) rather than 'like-this' (as they do
73 now), because `...' is so widely used elsewhere in Emacs.
74
75 - Some of the rules in the GNU coding standards section 5.2
76 "Commenting Your Work" also apply to ChangeLog entries: they must be
77 in English, and be complete sentences starting with a capital and
78 ending with a period (except the summary line should not end in a
79 period).
80
81 It is tempting to relax this rule for commit messages, since they
82 are somewhat transient. However, they are preserved indefinitely,
83 and have a reasonable chance of being read in the future, so it's
84 better that they have good presentation.
85
86 - There are multiple ChangeLogs in the emacs source; roughly one per
87 high-level directory. The ChangeLog entry for a commit belongs in the
88 lowest ChangeLog that is higher than or at the same level as any file
89 changed by the commit.
90
91 - Use the present tense; describe "what the change does", not "what
92 the change did".
93
94 - Preferred form for several entries with the same content:
95
96 * help.el (view-lossage):
97 * kmacro.el (kmacro-edit-lossage):
98 * edmacro.el (edit-kbd-macro): Fix docstring, lossage is now 300 keys.
99
100 (Rather than anything involving "ditto" and suchlike.)
101
102 - If the commit fixes a bug, add a separate line
103
104 Fixes: bug#NNNN
105
106 where NNNN is the bug number.
107
108 - In ChangeLog entries, there is no standard or recommended way to
109 identify revisions.
110
111 One way to identify revisions is by quoting their summary line.
112 Another is with an action stamp - an RFC3339 date followed by !
113 followed by the committer's email - for example,
114 "2014-01-16T05:43:35Z!esr@thyrsus.com". Often, "my previous commit"
115 will suffice.
116
117 - There is no need to make separate ChangeLog entries for files such
118 as NEWS, MAINTAINERS, and FOR-RELEASE, or to indicate regeneration
119 of files such as 'configure'. "There is no need" means you don't
120 have to, but you can if you want to.
121
122 ** branches
123
124 Development normally takes places on the trunk.
125 Sometimes specialized features are developed on separate branches
126 before possibly being merged to the trunk.
127
128 Development is discussed on the emacs-devel mailing list.
129
130 Sometime before the release of a new major version of Emacs a "feature
131 freeze" is imposed on the trunk, to prepare for creating a release
132 branch. No new features may be added to the trunk after this point,
133 until the release branch is created. Announcements about the freeze
134 (and other important events) are made on the info-gnu-emacs mailing
135 list, and not anywhere else.
136
137 The trunk branch is named "master" in git; release branches are named
138 "emacs-nn" where "nn" is the major version.
139
140 If you are fixing a bug that exists in the current release, be sure to
141 commit it to the release branch; it will be merged to the master
142 branch later.
143
144 However, if you know that the change will be difficult to merge to the
145 trunk (eg because the trunk code has changed a lot), you can apply the
146 change to both trunk and branch yourself. Indicate in the release
147 branch commit log that there is no need to merge the commit to the
148 trunk; start the commit message with "Backport:". gitmerge.el will
149 then exclude that commit from the merge to trunk.
150
151
152 ** Other process information
153
154 See all the files in admin/notes/* . In particular, see
155 admin/notes/newfile, see admin/notes/repo.
156
157 *** git vs rename
158
159 git does not explicitly represent a file renaming; it uses a percent
160 changed heuristic to deduce that a file was renamed. So if you are
161 planning to make extensive changes to a file after renaming it (or
162 moving it to another directory), you should:
163
164 - create a feature branch
165
166 - commit the rename without any changes
167
168 - make other changes
169
170 - merge the feature branch to trunk, _not_ squashing the commits into
171 one. The commit message on this merge should summarize the renames
172 and all the changes.
173
174 ** Emacs Mailing lists.
175
176 Discussion about Emacs development takes place on emacs-devel@gnu.org.
177
178 Bug reports and fixes, feature requests and implementations should be
179 sent to bug-gnu-emacs@gnu.org, the bug/feature list. This is coupled
180 to the tracker at http://debbugs.gnu.org .
181
182 You can subscribe to the mailing lists, or see the list archives,
183 by following links from http://savannah.gnu.org/mail/?group=emacs .
184
185 ** Document your changes.
186
187 Any change that matters to end-users should have an entry in etc/NEWS.
188
189 Doc-strings should be updated together with the code.
190
191 Think about whether your change requires updating the manuals. If you
192 know it does not, mark the NEWS entry with "---". If you know
193 that *all* the necessary documentation updates have been made, mark
194 the entry with "+++". Otherwise do not mark it.
195
196 Please see (info "(elisp)Documentation Tips") or
197 https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html
198 for more specific tips on Emacs's doc style. Use `checkdoc' to check
199 for documentation errors before submitting a patch.
200
201 ** Test your changes.
202
203 Please test your changes before committing them or sending them to the
204 list.
205
206 Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info
207 "(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/
208 for more information on writing and running tests.
209
210 To run tests on the entire Emacs tree, run "make check" from the
211 top-level directory. Most tests are in the directory
212 "test/automated". From the "test/automated" directory, run "make
213 <filename>" to run the tests for <filename>.el(c). See
214 "test/automated/Makefile" for more information.
215
216 ** Understanding Emacs Internals.
217
218 The best way to understand Emacs Internals is to read the code,
219 but the nodes "Tips" and "GNU Emacs Internals" in the Appendix
220 of the Emacs Lisp Reference Manual may also help.
221
222 The file etc/DEBUG describes how to debug Emacs bugs.
223
224
225 \f
226 This file is part of GNU Emacs.
227
228 GNU Emacs is free software: you can redistribute it and/or modify
229 it under the terms of the GNU General Public License as published by
230 the Free Software Foundation, either version 3 of the License, or
231 (at your option) any later version.
232
233 GNU Emacs is distributed in the hope that it will be useful,
234 but WITHOUT ANY WARRANTY; without even the implied warranty of
235 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
236 GNU General Public License for more details.
237
238 You should have received a copy of the GNU General Public License
239 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
240 \f
241 Local variables:
242 mode: outline
243 paragraph-separate: "[ \f]*$"
244 end: