libgit2

git_index_extension_add

Version:

Add an extension to the index

Signature

int git_index_extension_add(git_index *index, const char *signature, const char *data, size_t data_len);

Parameters

In
index

an existing index object

const char *
In
signature

the 4 character signature of the desired extension

const char *
In
data

the contents of the extension (not including the header)

size_t
In
data_len

the length of the data

Returns

int

0 (no error), GIT_EEXISTS (extension already present), or an error code

Versions