Editing Commit message guidelines

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 79: Line 79:
* Add the bug number, e.g. <code>(bug #12345)</code>, where applicable.
* Add the bug number, e.g. <code>(bug #12345)</code>, where applicable.
* Use prefixes where applicable:
* Use prefixes where applicable:
** <code>maint:</code> for reorganisation of the sources that do not change the source. Regular merge commits are a prominent example.
** <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.
** <code>doc:</code> for changes to the documentation.
** <code>gui:</code> for changes to the graphical user interface.
** <code>maint:</code> for reorganization of the sources that do not change the source. Regular merge commits are a prominent example.
** <code>test:</code> for changes to [[Tests]] only, e.g. new/removed BISTs, changed tolerances, etc.
=== 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 133: Line 112:


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]]
Please note that all contributions to Octave may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Octave:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: