git_status_foreach

Gather file statuses and run a callback for each one.

The callback is passed the path of the file, the status (a combination of the git_status_t values above) and the payload data pointer passed into this function.

If the callback returns a non-zero value, this function will stop looping and return that value to caller.

extern (C) nothrow @nogc
int
git_status_foreach

Parameters

repo libgit2_d.types.git_repository*

A repository object

callback .git_status_cb

The function to call on each file

payload void*

Pointer to pass through to callback function

Return Value

Type: int

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

Meta