]> git.ipfire.org Git - thirdparty/git.git/commit
config: plumb --fixed-value into config API
authorDerrick Stolee <dstolee@microsoft.com>
Wed, 25 Nov 2020 22:12:54 +0000 (22:12 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Nov 2020 22:43:48 +0000 (14:43 -0800)
commitc90702a1f6f7473a959994a2dff0f0dd450b8029
tree5a325cc4e319cd8e4a8a1b425abb48eea1c2652e
parentfda43942d7b78d2c529a40e5e38fc34034d929cb
config: plumb --fixed-value into config API

The git_config_set_multivar_in_file_gently() and related methods now
take a 'flags' bitfield, so add a new bit representing the --fixed-value
option from 'git config'. This alters the purpose of the value_pattern
parameter to be an exact string match. This requires some initialization
changes in git_config_set_multivar_in_file_gently() and a new strcmp()
call in the matches() method.

The new CONFIG_FLAGS_FIXED_VALUE flag is initialized in builtin/config.c
based on the --fixed-value option, and that needs to be updated in
several callers.

This patch only affects some of the modes of 'git config', and the rest
will be completed in the next change.

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