I was cloning the open embedded project yesterday. Because of connection problems, the cloning failed. I started the command again and cloning started from the beginning.
Note: for project including submodules, git 2.9.1 (July 2016) can help.
See commit bb9d91b (09 Jun 2016), and commit 665b35e (10 Jun 2016) by Stefan Beller (stefanbeller).
(Merged by Junio C Hamano -- gitster -- in commit bb2d8a8, 11 Jul 2016)
submodule--helper
: initial clone learns retry logicEach submodule that is attempted to be cloned, will be retried once in case of failure after all other submodules were cloned.
This helps to mitigate ephemeral server failures and increases chances of a reliable
If the retry fails, the error message will be:
Failed to clone '%s' a second time, aborting
clone of a repo with hundreds of submodules immensely.