config: avoid a funny sentinel value "a^"
Introduce CONFIG_REGEX_NONE as a more explicit sentinel value to say "we do not want to replace any existing entry" and use it in the implementation of "git config --add". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
c8466645ed
commit
c1063be2a3
@ -599,7 +599,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
|
||||
check_argc(argc, 2, 2);
|
||||
value = normalize_value(argv[0], argv[1]);
|
||||
return git_config_set_multivar_in_file(given_config_source.file,
|
||||
argv[0], value, "a^", 0);
|
||||
argv[0], value,
|
||||
CONFIG_REGEX_NONE, 0);
|
||||
}
|
||||
else if (actions == ACTION_REPLACE_ALL) {
|
||||
check_write();
|
||||
|
Reference in New Issue
Block a user