Changes

Jump to navigation Jump to search
→‎Body of the commit message: clarify and expand with more specific exceptions
If there is more than one file touched in different ways and the one-line
description isn't enough to describe all changes, the commit message needsaa full-body description.
Individual files you touched get their Each individual file changed by a commmit must have its changes separately enumerated. Ifthere a particular C or For changes affecting specific C++ functions, each function you changed, the general format name islisted inparentheses. For example
<pre>
* file.cc (class1::function1): Make change fooAdd something. (class2::function2, function3): Make change barDelete something else.
</pre>
Note the newline for describing the change to a different function. GeneralFor changes affecting specific Octave built-ins, each built-in name is listedGNU style guidelines can be followed herein parentheses with an "F" prefix, so that similar changes todifferent files can be groupedan implementation detail.For example
<pre>* data.cc (Fcolumns): Return columns.</pre> When the same change is applied to a series of files, or to a set of functionsin a single file, the file or function names may be grouped to shorten thecommit message. For example: <pre>* file1.cc, file2.cc, file3.cc, file4.cc: Include <sys/types.h>.* memory.cc (function1, function2, function3): Throw error if empty.</pre> Each line of the commit message body should also be kept under 80 columns. TheGNU standards recommend starting a new line for each parenthesized function,but if the line is short enough, we often avoid an extra newline. For example <pre>* file.cc (function1): Add an option. (function2): Add another option.</pre> Only the last file name component is typically needed, since most files haveunique names across the entire repository. One notable exception are the{{codeline|module.mk}} files in every directory, they should include thecomplete directory and file name. For example <pre>* doc/interpreter/module.mk (dist_man_MANS): Include foo.1 in the list.</pre> For m-script file and Fortran sources, the function name can be omitted ifthe filethe m-script contains only contains one filefunction. For changes outside of functionsor classes, of course the parenthetical (function) or (class::function)specifiers can also be omitted.
=== Wording ===
291

edits

Navigation menu