libgit2

git_index_set_version

Version:

Set index on-disk version.

Valid values are 2, 3, or 4. If 2 is given, git_index_write may write an index with version 3 instead, if necessary to accurately represent the index.

Signature

int git_index_set_version(git_index *index, unsigned int version);

Parameters

In
index

An existing index object

unsigned int
In
version

The new version number

Returns

int

0 on success, -1 on failure

Versions