Open main menu

Difference between revisions of "Commit Guidelines"

535 bytes added ,  12:30, 22 April 2013
add some actual commit guidelines, rearrange a little
(→‎Rules: Capitalize our subsystem names, since we want all of them capitalized in real commit messages.)
(add some actual commit guidelines, rearrange a little)
Line 1: Line 1:
In the past, ScummVM was quite lax on commit message formatting. Well, we won't start beating people up, but everyone should at least all be aware of the issue at hand; namely, what distinguishes good commit messages from bad ones. This page hopes to help all of us to improve our commit messages a bit... The benefit will be to the full team as commit logs will be more readable.  
This page contains some guidelines about commits and commit messages.


== Rules ==
== Commit guidelines ==
Thus the rules are following (they're standard to git except SUBSYSTEM thing):
 
Commits shouldn't contain multiple unrelated changes; try and make piecemeal changes if you can, to make it easier to review and merge. In particular, don't commit style/whitespace changes and functionality changes in a single commit.
 
If you change shared common code, then (while not necessarily in the same commit, due to the above guideline!) you should also make at least a best-effort attempt to make sure all of the engine/backend code stays working.
 
== Commit message formatting ==
We won't start beating people up, but everyone should at least all be aware of the issue at hand; namely, what distinguishes good commit messages from bad ones. This page hopes to help all of us to improve our commit messages a bit... The benefit will be to the full team as commit logs will be more readable.
 
The rules on commit messages are the following (they're standard to git, except our SUBSYSTEM requirement):
<pre>
<pre>
SUBSYSTEM: Short (50 chars or less) summary of changes
SUBSYSTEM: Short (50 chars or less) summary of changes
Line 42: Line 50:
After first line, an empty line is required which is used as separator. This first line has to be short and less than 50 characters so the log will fit on a standard 80-column terminal.
After first line, an empty line is required which is used as separator. This first line has to be short and less than 50 characters so the log will fit on a standard 80-column terminal.


== Good Practice ==
== Commit messages ==
Commit messages like the following aren't very helpful:
Commit messages like the following aren't very helpful:
* "not needed"  -> uhm, what is not needed?
* "not needed"  -> uhm, what is not needed?
193

edits