libgit2

git_submodule_repo_init

Version:

Set up the subrepository for a submodule in preparation for clone.

This function can be called to init and set up a submodule repository from a submodule in preparation to clone it from its remote.

Signature

int git_submodule_repo_init(git_repository **out, const git_submodule *sm, int use_gitlink);

Parameters

In
out

Output pointer to the created git repository.

In
sm

The submodule to create a new subrepository from.

int
In
use_gitlink

Should the workdir contain a gitlink to the repo in .git/modules vs. repo directly in workdir.

Returns

int

0 on success, < 0 on failure.

Versions