]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-config.txt
config: fix --comment formatting
[thirdparty/git.git] / Documentation / git-config.txt
index e608d5ffef236aeb9cb958477b9e1987db85887d..af374ee2e0fce42b01bcac880bbf0d3b7b62b139 100644 (file)
@@ -9,9 +9,9 @@ git-config - Get and set repository or global options
 SYNOPSIS
 --------
 [verse]
-'git config' [<file-option>] [--type=<type>] [--comment=<value>] [--fixed-value] [--show-origin] [--show-scope] [-z|--null] <name> [<value> [<value-pattern>]]
-'git config' [<file-option>] [--type=<type>] [--comment=<value>] --add <name> <value>
-'git config' [<file-option>] [--type=<type>] [--comment=<value>] [--fixed-value] --replace-all <name> <value> [<value-pattern>]
+'git config' [<file-option>] [--type=<type>] [--comment=<message>] [--fixed-value] [--show-origin] [--show-scope] [-z|--null] <name> [<value> [<value-pattern>]]
+'git config' [<file-option>] [--type=<type>] [--comment=<message>] --add <name> <value>
+'git config' [<file-option>] [--type=<type>] [--comment=<message>] [--fixed-value] --replace-all <name> <value> [<value-pattern>]
 'git config' [<file-option>] [--type=<type>] [--show-origin] [--show-scope] [-z|--null] [--fixed-value] --get <name> [<value-pattern>]
 'git config' [<file-option>] [--type=<type>] [--show-origin] [--show-scope] [-z|--null] [--fixed-value] --get-all <name> [<value-pattern>]
 'git config' [<file-option>] [--type=<type>] [--show-origin] [--show-scope] [-z|--null] [--fixed-value] [--name-only] --get-regexp <name-regex> [<value-pattern>]
@@ -87,10 +87,11 @@ OPTIONS
        values.  This is the same as providing '^$' as the `value-pattern`
        in `--replace-all`.
 
---comment <value>::
-       Append a comment to new or modified lines. A '#' character will be
-       unconditionally prepended to the value. The value must not contain
-       linefeed characters (no multi-line comments are permitted).
+--comment <message>::
+       Append a comment at the end of new or modified lines.
+       Unless _<message>_ begins with "#", a string "# " (hash
+       followed by a space) is prepended to it. The _<message>_ must not
+       contain linefeed characters (no multi-line comments are permitted).
 
 --get::
        Get the value for a given key (optionally filtered by a regex