git_tree_create_updated

Create a tree based on another one with the specified modifications

Given the baseline perform the changes described in the list of updates and create a new tree.

This function is optimized for common file/directory addition, removal and replacement in trees. It is much more efficient than reading the tree into a git_index and modifying that, but in exchange it is not as flexible.

Deleting and adding the same entry is undefined behaviour, changing a tree to a blob or viceversa is not supported.

Parameters

out_ libgit2_d.oid.git_oid*

id of the new tree

repo libgit2_d.types.git_repository*

the repository in which to create the tree, must be the same as for baseline

baseline libgit2_d.types.git_tree*

the tree to base these changes on

nupdates size_t

the number of elements in the update list

updates const(.git_tree_update)*

the list of updates to perform

Meta