Git fork

Merge branch 'kh/doc-config-subcommands'

Documentation updates.

* kh/doc-config-subcommands:
config: mention --url in the synopsis
config: use --value instead of value-pattern
config: document --[no-]value
config: use --value=<pattern> consistently
config: document --[no-]show-names

+27 -13
+21 -7
Documentation/git-config.adoc
··· 10 10 -------- 11 11 [verse] 12 12 'git config list' [<file-option>] [<display-option>] [--includes] 13 - 'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name> 14 - 'git config set' [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value> 15 - 'git config unset' [<file-option>] [--all] [--value=<value>] [--fixed-value] <name> 13 + 'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<pattern>] [--fixed-value] [--default=<default>] [--url=<url>] <name> 14 + 'git config set' [<file-option>] [--type=<type>] [--all] [--value=<pattern>] [--fixed-value] <name> <value> 15 + 'git config unset' [<file-option>] [--all] [--value=<pattern>] [--fixed-value] <name> 16 16 'git config rename-section' [<file-option>] <old-name> <new-name> 17 17 'git config remove-section' [<file-option>] <name> 18 18 'git config edit' [<file-option>] ··· 26 26 27 27 Multiple lines can be added to an option by using the `--append` option. 28 28 If you want to update or unset an option which can occur on multiple 29 - lines, a `value-pattern` (which is an extended regular expression, 29 + lines, `--value=<pattern>` (which is an extended regular expression, 30 30 unless the `--fixed-value` option is given) needs to be given. Only the 31 31 existing values that match the pattern are updated or unset. If 32 32 you want to handle the lines that do *not* match the pattern, just ··· 109 109 110 110 --replace-all:: 111 111 Default behavior is to replace at most one line. This replaces 112 - all lines matching the key (and optionally the `value-pattern`). 112 + all lines matching the key (and optionally `--value=<pattern>`). 113 113 114 114 --append:: 115 115 Adds a new line to the option without altering any existing ··· 200 200 section in linkgit:gitrevisions[7] for a more complete list of 201 201 ways to spell blob names. 202 202 203 + `--value=<pattern>`:: 204 + `--no-value`:: 205 + With `get`, `set`, and `unset`, match only against 206 + _<pattern>_. The pattern is an extended regular expression unless 207 + `--fixed-value` is given. 208 + + 209 + Use `--no-value` to unset _<pattern>_. 210 + 203 211 --fixed-value:: 204 - When used with the `value-pattern` argument, treat `value-pattern` as 212 + When used with `--value=<pattern>`, treat _<pattern>_ as 205 213 an exact string instead of a regular expression. This will restrict 206 214 the name/value pairs that are matched to only those where the value 207 - is exactly equal to the `value-pattern`. 215 + is exactly equal to _<pattern>_. 208 216 209 217 --type <type>:: 210 218 'git config' will ensure that any input or output is valid under the given ··· 258 266 --name-only:: 259 267 Output only the names of config variables for `list` or 260 268 `get`. 269 + 270 + `--show-names`:: 271 + `--no-show-names`:: 272 + With `get`, show config keys in addition to their values. The 273 + default is `--no-show-names` unless `--url` is given and there 274 + are no subsections in _<name>_. 261 275 262 276 --show-origin:: 263 277 Augment the output of all queried config options with the
+6 -6
builtin/config.c
··· 17 17 18 18 static const char *const builtin_config_usage[] = { 19 19 N_("git config list [<file-option>] [<display-option>] [--includes]"), 20 - N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name>"), 21 - N_("git config set [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value>"), 22 - N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>"), 20 + N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<pattern>] [--fixed-value] [--default=<default>] [--url=<url>] <name>"), 21 + N_("git config set [<file-option>] [--type=<type>] [--all] [--value=<pattern>] [--fixed-value] <name> <value>"), 22 + N_("git config unset [<file-option>] [--all] [--value=<pattern>] [--fixed-value] <name>"), 23 23 N_("git config rename-section [<file-option>] <old-name> <new-name>"), 24 24 N_("git config remove-section [<file-option>] <name>"), 25 25 N_("git config edit [<file-option>]"), ··· 33 33 }; 34 34 35 35 static const char *const builtin_config_get_usage[] = { 36 - N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp=<regexp>] [--value=<value>] [--fixed-value] [--default=<default>] <name>"), 36 + N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp=<regexp>] [--value=<pattern>] [--fixed-value] [--default=<default>] <name>"), 37 37 NULL 38 38 }; 39 39 40 40 static const char *const builtin_config_set_usage[] = { 41 - N_("git config set [<file-option>] [--type=<type>] [--comment=<message>] [--all] [--value=<value>] [--fixed-value] <name> <value>"), 41 + N_("git config set [<file-option>] [--type=<type>] [--comment=<message>] [--all] [--value=<pattern>] [--fixed-value] <name> <value>"), 42 42 NULL 43 43 }; 44 44 45 45 static const char *const builtin_config_unset_usage[] = { 46 - N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>"), 46 + N_("git config unset [<file-option>] [--all] [--value=<pattern>] [--fixed-value] <name>"), 47 47 NULL 48 48 }; 49 49