On Wed, Oct 28, 2015 at 7:21 PM, Stefan Beller <sbeller@xxxxxxxxxx> wrote: > Just pass it along to "git submodule update", which may pick reasonable > defaults if you don't specify an explicit number. > > Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx> > --- > @@ -724,8 +723,20 @@ static int checkout(void) > err |= run_hook_le(NULL, "post-checkout", sha1_to_hex(null_sha1), > sha1_to_hex(sha1), "1", NULL); > > - if (!err && option_recursive) > - err = run_command_v_opt(argv_submodule, RUN_GIT_CMD); > + if (!err && option_recursive) { > + struct argv_array args = ARGV_ARRAY_INIT; > + argv_array_pushl(&args, "submodule", "update", "--init", "--recursive", NULL); > + > + if (max_jobs != -1) { > + struct strbuf sb = STRBUF_INIT; > + strbuf_addf(&sb, "--jobs=%d", max_jobs); > + argv_array_push(&args, sb.buf); > + strbuf_release(&sb); The above four lines can be collapsed to: argv_array_pushf(&args, "--jobs=%d", max_jobs); > + } > + > + err = run_command_v_opt(args.argv, RUN_GIT_CMD); > + argv_array_clear(&args); > + } > > return err; > } -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html