config: rename git_config_set to git_config_set_gently
[gitweb.git] / builtin / clone.c
index a0b3cd9e5617b5a3a45dd01c8a2c7af0b2fd9668..a46d3d0f81da93924c8d47b98976942479944cc7 100644 (file)
@@ -732,7 +732,7 @@ static int checkout(void)
 
 static int write_one_config(const char *key, const char *value, void *data)
 {
-       return git_config_set_multivar(key, value ? value : "true", "^$", 0);
+       return git_config_set_multivar_gently(key, value ? value : "true", "^$", 0);
 }
 
 static void write_config(struct string_list *config)
@@ -783,12 +783,12 @@ static void write_refspec_config(const char *src_ref_prefix,
                /* Configure the remote */
                if (value.len) {
                        strbuf_addf(&key, "remote.%s.fetch", option_origin);
-                       git_config_set_multivar(key.buf, value.buf, "^$", 0);
+                       git_config_set_multivar_or_die(key.buf, value.buf, "^$", 0);
                        strbuf_reset(&key);
 
                        if (option_mirror) {
                                strbuf_addf(&key, "remote.%s.mirror", option_origin);
-                               git_config_set(key.buf, "true");
+                               git_config_set_or_die(key.buf, "true");
                                strbuf_reset(&key);
                        }
                }
@@ -946,14 +946,14 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
                        src_ref_prefix = "refs/";
                strbuf_addstr(&branch_top, src_ref_prefix);
 
-               git_config_set("core.bare", "true");
+               git_config_set_or_die("core.bare", "true");
        } else {
                strbuf_addf(&branch_top, "refs/remotes/%s/", option_origin);
        }
 
        strbuf_addf(&value, "+%s*:%s*", src_ref_prefix, branch_top.buf);
        strbuf_addf(&key, "remote.%s.url", option_origin);
-       git_config_set(key.buf, repo);
+       git_config_set_or_die(key.buf, repo);
        strbuf_reset(&key);
 
        if (option_reference.nr)