libgit2

git_tree_add_entry_unsorted

Version:

Add a new entry to a tree, returning that new entry. The only difference with this call is that it does not sort tree afterwards, this requirement is left to the caller.

This will mark the tree as modified; the new entry will be written back to disk on the next git_object_write()

Signature

int git_tree_add_entry_unsorted(git_tree_entry **entry, git_tree *tree, const git_oid *id, const char *filename, int attributes);

Parameters

git_tree_entry **
In
entry

Entry object which will be created

git_tree *
In
tree

Tree object to store the entry \iparam id OID for the tree entry

const char *
In
filename

Filename for the tree entry

int
In
attributes

UNIX file attributes for the entry

Returns

int

0 on success; otherwise error code

Versions