libgit2

git_submodule_foreach

Version:

Iterate over all submodules of a repository.

Signature

int git_submodule_foreach(git_repository *repo, int (*)(const char *, void *) callback, void *payload);

Parameters

In
repo

The repository

int (*)(const char *, void *)
In
callback

Function to be called with the name of each submodule. Return a non-zero value to terminate the iteration.

void *
In
payload

Extra data to pass to callback

Returns

int

0 on success, -1 on error, or non-zero return value of callback

Versions