Changes

Jump to navigation Jump to search
Line 82: Line 82:  
** <code>doc:</code> for changes to the documentation.
 
** <code>doc:</code> for changes to the documentation.
 
** <code>build:</code> for changes to the build system, for example autoconf or automake files.
 
** <code>build:</code> for changes to the build system, for example autoconf or automake files.
 +
 +
=== Wording ===
 +
 +
{| class="wikitable"
 +
! bad
 +
! good
 +
|-
 +
| style="color:darkred;" | "Added function"
 +
| style="color:green;" | "New function"
 +
|-
 +
| style="color:darkred;" | "Changed to return retval"
 +
| style="color:green;" | "Return retval"
 +
|-
 +
| style="color:darkred;" | "Fixed bug"
 +
| style="color:green;" | Write '''what''' has changed.
 +
|}
 +
 +
The commit message should describe '''what''' was changed, not '''why''' it was changed. Any explanations should appear as comments in the code, particularly if there is something that might not be obvious to someone reading it later.
    
=== Body of the commit message ===
 
=== Body of the commit message ===
Line 112: Line 130:     
For m-file and Fortran sources, the function name can be omitted if the file contains only one function. For changes outside of functions or classes, of course the parenthetical (function) or (class::function) specifiers can also be omitted.
 
For m-file and Fortran sources, the function name can be omitted if the file contains only one function. For changes outside of functions or classes, of course the parenthetical (function) or (class::function) specifiers can also be omitted.
  −
=== Wording ===
  −
  −
{| class="wikitable"
  −
! bad
  −
! good
  −
|-
  −
| style="color:darkred;" | "Added function"
  −
| style="color:green;" | "New function"
  −
|-
  −
| style="color:darkred;" | "Changed to return retval"
  −
| style="color:green;" | "Return retval"
  −
|-
  −
| style="color:darkred;" | "Fixed bug"
  −
| style="color:green;" | Write '''what''' has changed.
  −
|}
  −
  −
The commit message should describe '''what''' was changed, not '''why''' it was changed. Any explanations should appear as comments in the code, particularly if there is something that might not be obvious to someone reading it later.
  −
      
[[Category:Development]]
 
[[Category:Development]]

Navigation menu