libgit2

git_status_foreach_ext

Version:

Gather file status information and run callbacks as requested.

This is an extended version of the git_status_foreach() API that allows for more granular control over which paths will be processed and in what order. See the git_status_options structure for details about the additional controls that this makes available.

Note that if a pathspec is given in the git_status_options to filter the status, then the results from rename detection (if you enable it) may not be accurate. To do rename detection properly, this must be called with no pathspec so that all files can be considered.

Signature

int git_status_foreach_ext(git_repository *repo, const git_status_options *opts, git_status_cb callback, void *payload);

Parameters

In
repo

Repository object

In
opts

Status options structure

In
callback

The function to call on each file

void *
In
payload

Pointer to pass through to callback function

Returns

int

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

Versions