libgit2

git_repository_submodule_cache_all

Version:

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).

Signature

int git_repository_submodule_cache_all(git_repository *repo);

Parameters

In
repo

the repository whose submodules will be cached.

Returns

int

Versions