Load and cache all submodules.
Because the .gitmodules
file is unstructured, loading submodules is an
O(N) operation. Any operation (such as git_rebase_init
) that requires
accessing all submodules is O(N^2) in the number of submodules, if it
has to look each one up individually. This function loads all submodules
and caches them so that subsequent calls to git_submodule_lookup
are O(1).