Commit Messages

From GeeklogWiki
Jump to: navigation, search

Writing Good Commit Messages

A commit message should provide a short summary of the change that was made with the commit and why. You should be able to take a look at the list of recent commits and get an idea what was changed and why.

What was changed?

Don't just write "fixed problem". Summarize the problem and/or the fix. If there is an issue in the bugtracker that you're addressing with this commit (even if only partially), include it in the commit message. For example:

Fixed sort by date in search results (bug #0001002)

This is short and to the point. If you need any more information about the issue, you can look up the bug report in the bugtracker.

Commit messages should be in English and use "plain ASCII" (no national special characters).

Credits

The committer is automatically credited by Mercurial, so there's no need to add your name in the commit message. If you make a commit on somebody else's behalf, e.g. a patch, then include the contributor's name in the commit message, e.g.

Send correct content type and character set header in the install script (bug #0000964, patch provided by taca)

Note: We encourage contributors to send in patches using Mercurial's export command so that they will be listed as the actual author of the patch (instead of the person committing the patch).