libgit2

git_submodule_lookup

Version:

Lookup submodule information by name or path.

Given either the submodule name or path (they are ususally the same), this returns a structure describing the submodule. If the submodule does not exist, this will return GIT_ENOTFOUND and set the submodule pointer to NULL.

Signature

int git_submodule_lookup(git_submodule **submodule, git_repository *repo, const char *name);

Parameters

In
submodule

Pointer to submodule description object pointer..

In
repo

The repository.

const char *
In
name

The name of the submodule. Trailing slashes will be ignored.

Returns

int

0 on success, GIT_ENOTFOUND if submodule does not exist, -1 on error

Versions