git_submodule_foreach

Iterate over all tracked submodules of a repository.

See the note on git_submodule above. This iterates over the tracked submodules as described therein.

If you are concerned about items in the working directory that look like submodules but are not tracked, the diff API will generate a diff record for workdir items that look like submodules but are not tracked, showing them as added in the workdir. Also, the status API will treat the entire subdirectory of a contained git repo as a single git_status_t.GIT_STATUS_WT_NEW item.

extern (C) nothrow @nogc
int
git_submodule_foreach

Parameters

repo libgit2_d.types.git_repository*

The repository

callback .git_submodule_cb

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

payload void*

Extra data to pass to callback

Return Value

Type: int

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

Meta