libgit2

git_index_clear

Version:

Clear the contents (all the entries) of an index object.

This clears the index object in memory; changes must be explicitly written to disk for them to take effect persistently.

Signature

int git_index_clear(git_index *index);

Parameters

In
index

an existing index object

Returns

int

0 on success, error code < 0 on failure

Versions