libgit2

git_treebuilder_create

Version:

Create a new tree builder.

The tree builder can be used to create or modify trees in memory and write them as tree objects to the database.

If the source parameter is not NULL, the tree builder will be initialized with the entries of the given tree.

If the source parameter is NULL, the tree builder will have no entries and will have to be filled manually.

Signature

int git_treebuilder_create(git_treebuilder **builder_p, const git_tree *source);

Parameters

In
builder_p

Pointer where to store the tree builder

In
source

Source tree to initialize the builder (optional)

Returns

int

0 on sucess; error code otherwise

Versions