From: Junio C Hamano Date: Fri, 18 Jan 2019 21:49:52 +0000 (-0800) Subject: Merge branch 'sb/submodule-fetchjobs-default-to-one' X-Git-Tag: v2.21.0-rc0~100 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4744d03a47d668e0e2ea45a637fd16d782e035b9?hp=-c Merge branch 'sb/submodule-fetchjobs-default-to-one' "git submodule update" ought to use a single job unless asked, but by mistake used multiple jobs, which has been fixed. * sb/submodule-fetchjobs-default-to-one: submodule update: run at most one fetch job unless otherwise set --- 4744d03a47d668e0e2ea45a637fd16d782e035b9 diff --combined builtin/submodule--helper.c index b45514be31,1f8a4a9d52..0c5b2eb5fc --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@@ -1265,20 -1265,19 +1265,20 @@@ struct submodule_alternate_setup SUBMODULE_ALTERNATE_ERROR_IGNORE, NULL } static int add_possible_reference_from_superproject( - struct alternate_object_database *alt, void *sas_cb) + struct object_directory *odb, void *sas_cb) { struct submodule_alternate_setup *sas = sas_cb; + size_t len; /* * If the alternate object store is another repository, try the * standard layout with .git/(modules/)+/objects */ - if (ends_with(alt->path, "/objects")) { + if (strip_suffix(odb->path, "/objects", &len)) { char *sm_alternate; struct strbuf sb = STRBUF_INIT; struct strbuf err = STRBUF_INIT; - strbuf_add(&sb, alt->path, strlen(alt->path) - strlen("objects")); + strbuf_add(&sb, odb->path, len); /* * We need to end the new path with '/' to mark it as a dir, @@@ -1286,7 -1285,7 +1286,7 @@@ * as the last part of a missing submodule reference would * be taken as a file name. */ - strbuf_addf(&sb, "modules/%s/", sas->submodule_name); + strbuf_addf(&sb, "/modules/%s/", sas->submodule_name); sm_alternate = compute_alternate_path(sb.buf, &err); if (sm_alternate) { @@@ -1552,7 -1551,7 +1552,7 @@@ struct submodule_update_clone #define SUBMODULE_UPDATE_CLONE_INIT {0, MODULE_LIST_INIT, 0, \ SUBMODULE_UPDATE_STRATEGY_INIT, 0, 0, -1, STRING_LIST_INIT_DUP, 0, \ NULL, NULL, NULL, \ - NULL, 0, 0, 0, NULL, 0, 0, 0} + NULL, 0, 0, 0, NULL, 0, 0, 1} static void next_submodule_warn_missing(struct submodule_update_clone *suc,