(Based on http://wiki.openttd.org/Commit_style)¶
To achieve a coherent whole and to make changelog writing easier, here are some guidelines for commit messages.
<type> [#<Issue No.>] (r000): [<section>] Your message here (credits)
Prefix the message with one of the following types:
- "Add" when you added things
- "Cleanup" when you did a cleanup
- "Codechange" when you did a change to the code only, which doesn't effect gameplay in any way (so no bugfix!)
- "Change" when you made a change (use it as little as possible, unclear entry)
- "Doc", "Documentation" when the changes are only regarding documentation
- "Feature" when you added a feature
- "Fix" when you fixed something
- "Release" when a release is... released
- "Revert" when you dare to revert something
<Issue No.> (optional)
If you commit a fix for a bug reported in Issues, add the corresponding bug number in the form of [#NNNN]. Do it as well if you commit a submitted patch or implement a feature with a matching Issues entry.
In the case of bugfixes, if you know what revision the bug was introduced (eg regression), please mention that revision as well just after the prefix. Finding the trouble-causing revision is highly encouraged as it makes backporting/branching/releases that much easier.
Add a section if applicable. Examples for sections are:
- "Makefile" for makefile specific changes
- !!!More to be added!!!
Further explanations, general bitching, etc. don't go into the first line. Use a new line for those. If the patch was not made by you but you have added someone else's bugfix/feature be so kind as to mention them.
- If credits were added for a commit, do not forget to remove them for the changelog as that is anonymous.
Example of an ideal commit message; feature contributed by MekMester:
Feature: [Network] RCon (Remote Connection). A server can set: 'set rcon_pw <password>' to enable rcon A client can now do: 'rcon <password> "<command>"' (MekMester)
Another example. A bug introduced in r5123 was fixed:
Fix (r5123): server could crash under certain circumstances.