libgit2

git_status_foreach

Version:

Gather file statuses and run a callback for each one.

The callback is passed the path of the file, the status and the data pointer passed to this function. If the callback returns something other than GIT_SUCCESS, this function will return that value.

Signature

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

Parameters

In
repo

a repository object

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

the function to call on each file

void *
In
payload

Returns

int

GIT_SUCCESS or the return value of the callback which did not return GIT_SUCCESS

Versions