libgit2

git_index_get

Version:

Get a pointer to one of the entries in the index

This entry can be modified, and the changes will be written back to disk on the next write() call.

The entry should not be freed by the caller.

Signature

git_index_entry *git_index_get(git_index *index, unsigned int n);

Parameters

In
index

an existing index object

unsigned int
In
n

the position of the entry

Returns

a pointer to the entry; NULL if out of bounds

Versions