libgit2

git_index_iterator_new

Version:

Create an iterator that will return every entry contained in the index at the time of creation. Entries are returned in order, sorted by path. This iterator is backed by a snapshot that allows callers to modify the index while iterating without affecting the iterator.

Signature

int git_index_iterator_new(git_index_iterator **iterator_out, git_index *index);

Parameters

In
iterator_out

The newly created iterator

In
index

The index to iterate

Returns

int

0 or an error code.

Versions