libgit2

git_submodule_open

Version:

Open the repository for a submodule.

This is a newly opened repository object. The caller is responsible for calling git_repository_free() on it when done. Multiple calls to this function will return distinct git_repository objects. This will only work if the submodule is checked out into the working directory.

Signature

int git_submodule_open(git_repository **repo, git_submodule *submodule);

Parameters

In
repo

Pointer to the submodule repo which was opened

In
submodule

Submodule to be opened

Returns

int

0 on success, < 0 if submodule repo could not be opened.

Versions