libgit2

git_index_remove_all

Version:

Remove all matching index entries.

If you provide a callback function, it will be invoked on each matching item in the index immediately before it is removed. Return 0 to remove the item, > 0 to skip the item, and < 0 to abort the scan.

Signature

int git_index_remove_all(git_index *index, const git_strarray *pathspec, git_index_matched_path_cb callback, void *payload);

Parameters

In
index

An existing index object

In
pathspec

array of path patterns

In
callback

notification callback for each removed path (also gets index of matching pathspec entry); can be NULL; return 0 to add, >0 to skip, < 0 to abort scan.

void *
In
payload

payload passed through to callback function

Returns

int

0 or an error code

Versions