{numberedheadings}
{toc}
h1. Commit Message Formatting
The following illustrates the basic outline for commit messages:\\
{code}
<One-liner summary of changes>
<Empty Line>
<Verbose description of the changes>
<Empty Line>
<Special Tags>
{code}
Some commit history viewers treat the first line of commit messages as the summary for the commit. So, an effort should be made to format our commit messages in that fashion. The verbose description may contain multiple paragraphs, itemized lists, etc. Always end the first sentence (and any subsequent sentences) with punctuation.
Commit messages should be wrapped at 80 columns.
Note that for trivial commits, such as "fix the build", or "fix spelling mistake", the verbose description may not be necessary.
h1. Special Tags for Commit Messages
h2. JIRA (https://issues.asterisk.org/jira/)
To have a commit noted in an issue, use a tag of the form:
{noformat}
(issue ASTERISK-1234)
{noformat}
To have a commit automatically close an issue, use a tag of the form:
{noformat}
(closes issue ASTERISK-1234)
{noformat}
{warning}
Automatically closing issues in JIRA is not yet implemented, but this is how it will work once enabled.
{warning}
Also include information about who reported an issue, or who contributed testing feedback:
{noformat}
(closes issue ASTERISK-1234)
Reported by: SomeGuy
Tested by: SomeOtherGuy, SomeOtherGuy2
Patches:
fix_bug_1234.diff uploaded by SomeDeveloper (license 5678)
{noformat}
If the patch being committed was written by the person doing the commit, and is not available to reference as an upload to the issue, there is no need to include something like "fixed by me", as that will be the default assumption when a specific patch is not referenced.
h2. Review Board (https://reviewboard.asterisk.org/)
To have a commit set a review request as submitted, include the full URL to the review request. For example:
{noformat}
Review: https://reviewboard.asterisk.org/r/95/
{noformat}
h1. Commit Messages with svnmerge
When using the svnmerge tool for merging changes between branches, use the _commit message generated by svnmerge_. The '-F' option to svnmerge allows you to specify a file for _svnmerge_ to write out a commit message to. The '-F' option to svn commit allows you to specify a file that contains the commit message.
{tip}
If you are using the expect script wrappers for svnmerge from repotools, a commit message is automatically placed in the file '../merge.msg'.
{tip}
For more detailed information about working with branches and merging, see [Subversion Usage].
{numberedheadings} |