<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2160/1/7/_/styles/combined.css?spaceKey=AST&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://wiki.asterisk.org/wiki/display/AST/Commit+Messages">Commit Messages</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://wiki.asterisk.org/wiki/display/~russell">Russell Bryant</a>
    </h4>
        <div id="versionComment">
        <b>Comment:</b>
        svn integration in JIRA is done<br />
    </div>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{warning} <br>Automatically closing issues in JIRA is not yet implemented, but this is how it will work once enabled. <br>{warning} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >Also include information about who reported an issue, or who contributed testing feedback: <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        

<div>
<ul>
    <li><a href='#CommitMessages-CommitMessageFormatting'>1. Commit Message Formatting</a></li>
    <li><a href='#CommitMessages-SpecialTagsforCommitMessages'>2. Special Tags for Commit Messages</a></li>
<ul>
    <li><a href='#CommitMessages-JIRA%28https%3A%2F%2Fissues.asterisk.org%2Fjira%2F%29'>2.1. JIRA ( https://issues.asterisk.org/jira/)</a></li>
    <li><a href='#CommitMessages-ReviewBoard%28https%3A%2F%2Freviewboard.asterisk.org%2F%29'>2.2. Review Board ( https://reviewboard.asterisk.org/)</a></li>
</ul>
    <li><a href='#CommitMessages-CommitMessageswithsvnmerge'>3. Commit Messages with svnmerge</a></li>
</ul></div>

<h1><a name="CommitMessages-CommitMessageFormatting"></a>1. Commit Message Formatting</h1>

<p>The following illustrates the basic outline for commit messages:<br class="atl-forced-newline" /> </p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">&lt;One-liner summary of changes&gt;

&lt;Empty Line&gt;

&lt;Verbose description of the changes&gt;

&lt;Empty Line&gt;

&lt;Special Tags&gt;</pre>
</div></div>

<p>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.</p>

<p>Commit messages should be wrapped at 80 columns.</p>

<p>Note that for trivial commits, such as "fix the build", or "fix spelling mistake", the verbose description may not be necessary.</p>


<h1><a name="CommitMessages-SpecialTagsforCommitMessages"></a>2. Special Tags for Commit Messages</h1>


<h2><a name="CommitMessages-JIRA%28https%3A%2F%2Fissues.asterisk.org%2Fjira%2F%29"></a>2.1. JIRA (<a href="https://issues.asterisk.org/jira/" class="external-link" rel="nofollow">https://issues.asterisk.org/jira/</a>)</h2>

<p>To have a commit noted in an issue, use a tag of the form:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>(issue ASTERISK-1234)
</pre>
</div></div>

<p>To have a commit automatically close an issue, use a tag of the form:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>(closes issue ASTERISK-1234)
</pre>
</div></div>

<p>Also include information about who reported an issue, or who contributed testing feedback:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>(closes issue ASTERISK-1234)
Reported by: SomeGuy
Tested by: SomeOtherGuy, SomeOtherGuy2
Patches:
     fix_bug_1234.diff uploaded by SomeDeveloper (license 5678)
</pre>
</div></div>

<p>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.</p>

<h2><a name="CommitMessages-ReviewBoard%28https%3A%2F%2Freviewboard.asterisk.org%2F%29"></a>2.2. Review Board (<a href="https://reviewboard.asterisk.org/" class="external-link" rel="nofollow">https://reviewboard.asterisk.org/</a>)</h2>

<p>To have a commit set a review request as submitted, include the full URL  to the review request. For example:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>Review: https://reviewboard.asterisk.org/r/95/
</pre>
</div></div>

<h1><a name="CommitMessages-CommitMessageswithsvnmerge"></a>3. Commit Messages with svnmerge</h1>

<p>When using the svnmerge tool for merging changes between branches, use the <em>commit message generated by svnmerge</em>. The '-F' option to svnmerge allows you to specify a file for <em>svnmerge</em> to write out a commit message to. The '-F' option to svn commit allows you to specify a file that contains the commit message.</p>

<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>If you are using the expect script wrappers for svnmerge from repotools, a commit message is automatically placed in the file '../merge.msg'.</td></tr></table></div>

<p>For more detailed information about working with branches and merging,  see <a href="/wiki/display/AST/Subversion+Usage" title="Subversion Usage">Subversion Usage</a>.</p>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
        <a href="https://wiki.asterisk.org/wiki/display/AST/Commit+Messages">View Online</a>
        |
        <a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=3702833&revisedVersion=8&originalVersion=7">View Changes</a>
                |
        <a href="https://wiki.asterisk.org/wiki/display/AST/Commit+Messages?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>