libgit2

git_index_append2

Version:

Add (append) an index entry from an in-memory struct

A new entry will always be inserted into the index; if the index already contains an entry for the path in the entry struct, the old entry will not be replaced.

A full copy (including the 'path' string) of the given 'source_entry' will be inserted on the index.

Signature

int git_index_append2(git_index *index, const git_index_entry *source_entry);

Parameters

In
index

an existing index object

In
source_entry

new entry object

Returns

int

0 or an error code

Versions