summaryrefslogtreecommitdiff
path: root/builtin/clone.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-05-16 11:51:56 +0900
committerJunio C Hamano <gitster@pobox.com>2017-05-16 11:51:56 +0900
commit883247c2fc1783b448fb8730284de85a758dc05d (patch)
treea0592cbc3660042e0b4b9780f419e1b7469f8836 /builtin/clone.c
parent4875663703154974a71e8c706f257464b3f223e5 (diff)
parentdb4eca1feaafa0669b7ba64c10314dfe8836576a (diff)
downloadgit-883247c2fc1783b448fb8730284de85a758dc05d.tar.gz
Merge branch 'jn/clone-add-empty-config-from-command-line'
"git clone --config var=val" is a way to populate the per-repository configuration file of the new repository, but it did not work well when val is an empty string. This has been fixed. * jn/clone-add-empty-config-from-command-line: clone: handle empty config values in -c
Diffstat (limited to 'builtin/clone.c')
-rw-r--r--builtin/clone.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index 05f52d6f2b..afab299433 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -776,7 +776,9 @@ static int checkout(int submodule_progress)
static int write_one_config(const char *key, const char *value, void *data)
{
- return git_config_set_multivar_gently(key, value ? value : "true", "^$", 0);
+ return git_config_set_multivar_gently(key,
+ value ? value : "true",
+ CONFIG_REGEX_NONE, 0);
}
static void write_config(struct string_list *config)