diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-08-12 09:47:34 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-12 09:47:34 -0700 |
commit | 2f9c615efb164e62fb27a5d4a50454ae9f5c87ad (patch) | |
tree | 565557ac48381156f0119fb07422715bd3e19923 /builtin | |
parent | Sync with maint (diff) | |
parent | submodule--helper: use parallel processor correctly (diff) | |
download | tgif-2f9c615efb164e62fb27a5d4a50454ae9f5c87ad.tar.xz |
Merge branch 'sb/submodule-clone-retry'
Fix-up to an error codepath in a topic already in 'master'.
* sb/submodule-clone-retry:
submodule--helper: use parallel processor correctly
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/submodule--helper.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index b09632e468..343d25b758 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -748,8 +748,12 @@ static int update_clone_get_next_task(struct child_process *child, if (index < suc->failed_clones_nr) { int *p; ce = suc->failed_clones[index]; - if (!prepare_to_clone_next_submodule(ce, child, suc, err)) - die("BUG: ce was a submodule before?"); + 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"); + return 0; + } p = xmalloc(sizeof(*p)); *p = suc->current; *idx_task_cb = p; |