libgit2

git_tree_add_entry

Version:

Add a new entry to a tree.

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(git_tree *tree, const git_oid *id, const char *filename, int attributes);

Parameters

git_tree *
In
tree

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

const git_oid *
In
id
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