libgit2

git_tree_new

Version:

Create a new in-memory git_tree.

The tree object must be manually filled using setter methods before it can be written to its repository.

Signature

int git_tree_new(git_tree **tree, git_repository *repo);

Parameters

In
tree

pointer to the new tree

In
repo

The repository where the object will reside

Returns

int

0 on success; error code otherwise

Versions