Merge branch 'jk/git-shell-drop-cvsserver' into maint-2.10
[gitweb.git] / builtin / submodule--helper.c
index 343d25b75844bee78a2a0acd78d4d32dfbaa0d9e..dbe5699fe688faeec3bdad899f229746b96be57f 100644 (file)
@@ -444,8 +444,7 @@ static int module_name(int argc, const char **argv, const char *prefix)
 static int clone_submodule(const char *path, const char *gitdir, const char *url,
                           const char *depth, const char *reference, int quiet)
 {
-       struct child_process cp;
-       child_process_init(&cp);
+       struct child_process cp = CHILD_PROCESS_INIT;
 
        argv_array_push(&cp.args, "clone");
        argv_array_push(&cp.args, "--no-checkout");
@@ -638,7 +637,7 @@ static int prepare_to_clone_next_submodule(const struct cache_entry *ce,
                if (suc->recursive_prefix)
                        strbuf_addf(&sb, "%s/%s", suc->recursive_prefix, ce->name);
                else
-                       strbuf_addf(&sb, "%s", ce->name);
+                       strbuf_addstr(&sb, ce->name);
                strbuf_addf(out, _("Skipping unmerged submodule %s"), sb.buf);
                strbuf_addch(out, '\n');
                goto cleanup;
@@ -750,8 +749,9 @@ static int update_clone_get_next_task(struct child_process *child,
                ce = suc->failed_clones[index];
                if (!prepare_to_clone_next_submodule(ce, child, suc, err)) {
                        suc->current ++;
-                       strbuf_addf(err, "BUG: submodule considered for cloning,"
-                                   "doesn't need cloning any more?\n");
+                       strbuf_addstr(err, "BUG: submodule considered for "
+                                          "cloning, doesn't need cloning "
+                                          "any more?\n");
                        return 0;
                }
                p = xmalloc(sizeof(*p));