]> git.ipfire.org Git - thirdparty/git.git/commit - Documentation/git-config.txt
config: add --fixed-value option, un-implemented
authorDerrick Stolee <dstolee@microsoft.com>
Wed, 25 Nov 2020 22:12:53 +0000 (22:12 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Nov 2020 22:43:48 +0000 (14:43 -0800)
commitfda43942d7b78d2c529a40e5e38fc34034d929cb
tree6f602c1edc3d8e75daa87b4d8ae561c99b3b99c9
parentd15671943e763902c7a9c070a988f3b0489f11f7
config: add --fixed-value option, un-implemented

The 'git config' builtin takes a 'value-pattern' parameter for several
actions. This can cause confusion when expecting exact value matches
instead of regex matches, especially when the input string contains
metacharacters. While callers can escape the patterns themselves, it
would be more friendly to allow an argument to disable the pattern
matching in favor of an exact string match.

Add a new '--fixed-value' option that does not currently change the
behavior. The implementation will be filled in by later changes for
each appropriate action. For now, check and test that --fixed-value
will abort the command when included with an incompatible action or
without a 'value-pattern' argument.

The name '--fixed-value' was chosen over something simpler like
'--fixed' because some commands allow regular expressions on the
key in addition to the value.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-config.txt
builtin/config.c
t/t1300-config.sh