libgit2

git_index_open_ext

Version:

Creates a new bare Git index object, without a repository to back it. This index object is capable of storing SHA256 objects.

Signature

int git_index_open_ext(git_index **index_out, const char *index_path, const git_index_options *opts);

Parameters

In
index_out

the pointer for the new index

const char *
In
index_path

the path to the index file in disk

In
opts

the options for opening the index, or NULL

Returns

int

0 or an error code

Versions