libgit2

git_index_find

Version:

Find the first position of any entries which point to given path in the Git index.

Signature

int git_index_find(size_t *at_pos, git_index *index, const char *path);

Parameters

size_t *
In
at_pos

the address to which the position of the index entry is written (optional)

In
index

an existing index object

const char *
In
path

path to search

Returns

int

0 with valid value in at_pos; an error code otherwise

Versions