summaryrefslogtreecommitdiff
path: root/builtin/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-19 18:38:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-09-19 18:38:40 (GMT)
commit4daf5c864348e8d2002b082d8ac484c650e395d4 (patch)
tree9d5d764dd36e3d502302bed2591b29dd3be440c4 /builtin/config.c
parent9d6db4a28ddbaf66bbc257251e97e9511a9148fd (diff)
parentc1063be2a3e14ac042db4fe9b9bcea8f2768886a (diff)
downloadgit-4daf5c864348e8d2002b082d8ac484c650e395d4.zip
git-4daf5c864348e8d2002b082d8ac484c650e395d4.tar.gz
git-4daf5c864348e8d2002b082d8ac484c650e395d4.tar.bz2
Merge branch 'ta/config-add-to-empty-or-true-fix'
"git config --add section.var val" used to lose existing section.var whose value was an empty string. * ta/config-add-to-empty-or-true-fix: config: avoid a funny sentinel value "a^" make config --add behave correctly for empty and NULL values
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 aba7135..37305e9 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -611,7 +611,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, "^$", 0);
+ argv[0], value,
+ CONFIG_REGEX_NONE, 0);
}
else if (actions == ACTION_REPLACE_ALL) {
check_write();