libgit2

git_repository_index

Version:

Get the Index file for this repository.

If a custom index has not been set, the default index for the repository will be returned (the one located in .git/index).

The index must be freed once it's no longer being used by the user.

Signature

int git_repository_index(git_index **out, git_repository *repo);

Parameters

In
out

Pointer to store the loaded index

In
repo

A repository object

Returns

int

0, or an error code

Versions