diff options
Diffstat (limited to 'builtin/submodule--helper.c')
-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; |