libgit2

git_submodule_owner

Version:

Get the containing repository for a submodule.

This returns a pointer to the repository that contains the submodule. This is a just a reference to the repository that was passed to the original git_submodule_lookup() call, so if that repository has been freed, then this may be a dangling reference.

Signature

git_repository *git_submodule_owner(git_submodule *submodule);

Parameters

In
submodule

Pointer to submodule object

Returns

Versions