diff options
author | Jeff King <peff@peff.net> | 2014-08-19 10:20:00 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-12 03:33:54 +0400 |
commit | c1063be2a3e14ac042db4fe9b9bcea8f2768886a (patch) | |
tree | 2859019665ab4774fe6699ae06d0aa67e17ae8db /builtin | |
parent | c8466645edd1413c7efed824f5bddac457eb77f9 (diff) |
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>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/config.c b/builtin/config.c index 8224699663..bf1aa6b2e4 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -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(); |