diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-06-05 02:03:11 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-05 02:03:11 +0200 |
commit | c8c33216333c4b2ba86f51d9fa77f7c4daba8d30 (patch) | |
tree | d29e0c400cdc00a2cb0084158087a59eacd5f0d3 /builtin/clone.c | |
parent | Merge branch 'ab/c-translators-comment-style' into maint (diff) | |
parent | clone: handle empty config values in -c (diff) | |
download | git-c8c33216333c4b2ba86f51d9fa77f7c4daba8d30.tar.xz git-c8c33216333c4b2ba86f51d9fa77f7c4daba8d30.zip |
Merge branch 'jn/clone-add-empty-config-from-command-line' into maint
"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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index de85b85254..a6ae7d6180 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -773,7 +773,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) |