libgit2

git_index_find_prefix

Version:

Find the first position of any entries matching a prefix. To find the first position of a path inside a given folder, suffix the prefix with a '/'.

Signature

int git_index_find_prefix(size_t *at_pos, git_index *index, const char *prefix);

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
prefix

the prefix to search for

Returns

int

0 with valid value in at_pos; an error code otherwise

Versions