diff options
| author | Eli Zaretskii | 2015-04-22 14:25:34 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-04-22 14:25:34 +0300 |
| commit | c4e0ba51552ec773003f5f81a09132d729f812cc (patch) | |
| tree | 7c5690b6ca538b19f59482e921dc52b03ad4106d /CONTRIBUTE | |
| parent | 934968a2adea1b4a550f2a0d5a47fc5757bb9082 (diff) | |
| download | emacs-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-- | CONTRIBUTE | 117 |
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 | ||
| 9 | An "Emacs Developer" is someone who contributes a lot of code or | 9 | An "Emacs Developer" is someone who contributes a lot of code or |
| 10 | documentation to the Emacs repository. Generally, they have write | 10 | documentation to the Emacs repository. Generally, they have write |
| 11 | access to the Emacs git repository on Savannah | 11 | access to the Emacs git repository on Savannah |
| 12 | https://savannah.gnu.org/git/?group=emacs. | 12 | https://savannah.gnu.org/git/?group=emacs. |
| 13 | 13 | ||
| 14 | ** Write access to the Emacs repository. | 14 | ** Write access to the Emacs repository. |
| 15 | 15 | ||
| 16 | Once you become a frequent contributor to Emacs, we can consider | 16 | Once you become a frequent contributor to Emacs, we can consider |
| 17 | giving you write access to the version-control repository. Request | 17 | giving you write access to the version-control repository. Request |
| 18 | access on the emacs-devel@gnu.org mailing list. | 18 | access on the emacs-devel@gnu.org mailing list. Also, be sure to |
| 19 | subscribe to the emacs-devel@gnu.org mailing list and include the | ||
| 20 | "emacs-announce" topic, so that you get the announcements about | ||
| 21 | feature freeze and other important events. | ||
| 19 | 22 | ||
| 20 | ** Using the Emacs repository | 23 | ** Using the Emacs repository |
| 21 | 24 | ||
| 22 | Emacs uses git for the source code repository. | 25 | Emacs uses Git for the source code repository. |
| 23 | 26 | ||
| 24 | See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get | 27 | See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get |
| 25 | started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more | 28 | started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more |
| @@ -28,16 +31,18 @@ advanced information. | |||
| 28 | Alternately, see admin/notes/git-workflow. | 31 | Alternately, see admin/notes/git-workflow. |
| 29 | 32 | ||
| 30 | If committing changes written by someone else, make the commit in | 33 | If committing changes written by someone else, make the commit in |
| 31 | their name, not yours. git distinguishes between the author | 34 | their name, not yours. Git distinguishes between the author |
| 32 | and the committer; use the --author option on the commit command to | 35 | and the committer; use the --author option on the commit command to |
| 33 | specify the actual author; the committer defaults to you. | 36 | specify the actual author; the committer defaults to you. |
| 34 | 37 | ||
| 35 | ** Commit messages | 38 | ** Commit messages |
| 36 | 39 | ||
| 37 | When a release is prepared, the commit messages are used to generate | 40 | Emacs development no longer stores descriptions of new changes in |
| 38 | the ChangeLog file. So a typical patch does not touch any of the | 41 | ChangeLog files. Instead, a single ChangeLog file is generated from |
| 39 | ChangeLog files in the repository, but contains the ChangeLog entries | 42 | the commit messages when a release is prepared. So changes you commit |
| 40 | in its message. Here is an example commit message (indented): | 43 | should not touch any of the ChangeLog files in the repository, but |
| 44 | instead should contain the log entries in the commit message. Here is | ||
| 45 | an 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 | ||
| 51 | The general format is as follows. | 56 | Below are some rules and recommendations for formatting commit |
| 57 | messages: | ||
| 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 | ||
| 161 | Development normally takes places on the trunk. | 170 | Development normally takes places on the trunk. |
| 162 | Sometimes specialized features are developed on separate branches | 171 | Sometimes specialized features are developed on separate branches |
| @@ -167,9 +176,9 @@ Development is discussed on the emacs-devel mailing list. | |||
| 167 | Sometime before the release of a new major version of Emacs a "feature | 176 | Sometime before the release of a new major version of Emacs a "feature |
| 168 | freeze" is imposed on the trunk, to prepare for creating a release | 177 | freeze" is imposed on the trunk, to prepare for creating a release |
| 169 | branch. No new features may be added to the trunk after this point, | 178 | branch. No new features may be added to the trunk after this point, |
| 170 | until the release branch is created. Announcements about the freeze | 179 | until 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 |
| 172 | list, and not anywhere else. | 181 | list under the "emacs-announce" topic, and not anywhere else. |
| 173 | 182 | ||
| 174 | The trunk branch is named "master" in git; release branches are named | 183 | The 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 | ||
| 191 | See all the files in admin/notes/* . In particular, see | 200 | See all the files in admin/notes/* . In particular, see |
| 192 | admin/notes/newfile, see admin/notes/repo. | 201 | admin/notes/newfile, see admin/notes/repo. |
| 193 | 202 | ||
| 194 | *** git vs rename | 203 | *** git vs rename |
| 195 | 204 | ||
| 196 | git does not explicitly represent a file renaming; it uses a percent | 205 | Git does not explicitly represent a file renaming; it uses a percent |
| 197 | changed heuristic to deduce that a file was renamed. So if you are | 206 | changed heuristic to deduce that a file was renamed. So if you are |
| 198 | planning to make extensive changes to a file after renaming it (or | 207 | planning to make extensive changes to a file after renaming it (or |
| 199 | moving it to another directory), you should: | 208 | moving 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. | |||
| 232 | Think about whether your change requires updating the manuals. If you | 241 | Think about whether your change requires updating the manuals. If you |
| 233 | know it does not, mark the NEWS entry with "---". If you know | 242 | know it does not, mark the NEWS entry with "---". If you know |
| 234 | that *all* the necessary documentation updates have been made, mark | 243 | that *all* the necessary documentation updates have been made, mark |
| 235 | the entry with "+++". Otherwise do not mark it. | 244 | the entry with "+++". Otherwise do not mark it. |
| 236 | 245 | ||
| 237 | Please see (info "(elisp)Documentation Tips") or | 246 | Please see (info "(elisp)Documentation Tips") or |
| 238 | https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html | 247 | https://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 | ||
| 259 | The best way to understand Emacs Internals is to read the code, | 268 | The best way to understand Emacs Internals is to read the code, |
| 260 | but the nodes "Tips" and "GNU Emacs Internals" in the Appendix | 269 | but the nodes "Tips" and "GNU Emacs Internals" in the Appendix |
| 261 | of the Emacs Lisp Reference Manual may also help. | 270 | of the Emacs Lisp Reference Manual may also help. Some source files, |
| 271 | such as xdisp.c, have large commentaries describing the design and | ||
| 272 | implementation in more detail. | ||
| 262 | 273 | ||
| 263 | The file etc/DEBUG describes how to debug Emacs bugs. | 274 | The file etc/DEBUG describes how to debug Emacs bugs. |
| 264 | 275 | ||