Skip to content

Commit c902618

Browse files
committed
config doc: value-pattern is not necessarily a regexp
The introductory part of the "git config --help" mentions the optional value-pattern argument, but give no hint that it can be something other than a regular expression (worse, it just says "POSIX regexp", which usually means BRE but the regexp the command takes is ERE). Also, it needs to be documented that the '!' prefix to negate the match, which is only mentioned in this part of the document, works only with regexp and not with the --fixed-value. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3f1bae1 commit c902618

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Documentation/git-config.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@ escaped.
3333

3434
Multiple lines can be added to an option by using the `--add` option.
3535
If you want to update or unset an option which can occur on multiple
36-
lines, a POSIX regexp `value-pattern` needs to be given. Only the
37-
existing values that match the regexp are updated or unset. If
38-
you want to handle the lines that do *not* match the regex, just
39-
prepend a single exclamation mark in front (see also <<EXAMPLES>>).
36+
lines, a `value-pattern` (which is an extended regular expression,
37+
unless the `--fixed-value` option is given) needs to be given. Only the
38+
existing values that match the pattern are updated or unset. If
39+
you want to handle the lines that do *not* match the pattern, just
40+
prepend a single exclamation mark in front (see also <<EXAMPLES>>),
41+
but note that this only works when the `--fixed-value` option is not
42+
in use.
4043

4144
The `--type=<type>` option instructs 'git config' to ensure that incoming and
4245
outgoing values are canonicalize-able under the given <type>. If no

0 commit comments

Comments
 (0)