git_index_open

Create a new bare Git index object as a memory representation of the Git index file in 'index_path', without a repository to back it.

Since there is no ODB or working directory behind this index, any Index methods which rely on these (e.g. index_add_bypath) will fail with the git_error_code.GIT_ERROR error code.

If you need to access the index of an actual repository, use the git_repository_index wrapper.

The index must be freed once it's no longer in use.

extern (C) nothrow @nogc
int
git_index_open

Parameters

out_ libgit2_d.types.git_index**

the pointer for the new index

index_path const(char)*

the path to the index file in disk

Return Value

Type: int

0 or an error code

Meta