summaryrefslogtreecommitdiff
path: root/builtin/config.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-08-19 06:20:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-09-11 23:33:54 (GMT)
commitc1063be2a3e14ac042db4fe9b9bcea8f2768886a (patch)
tree2859019665ab4774fe6699ae06d0aa67e17ae8db /builtin/config.c
parentc8466645edd1413c7efed824f5bddac457eb77f9 (diff)
downloadgit-c1063be2a3e14ac042db4fe9b9bcea8f2768886a.zip
git-c1063be2a3e14ac042db4fe9b9bcea8f2768886a.tar.gz
git-c1063be2a3e14ac042db4fe9b9bcea8f2768886a.tar.bz2
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/config.c')
-rw-r--r--builtin/config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/config.c b/builtin/config.c
index 8224699..bf1aa6b 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();