Struct git2::build::TreeUpdateBuilder [−][src]
pub struct TreeUpdateBuilder { /* fields omitted */ }
Expand description
A builder struct for git tree updates, for use with git_tree_create_updated
.
Implementations
Add an update removing the specified path
from a tree.
Add an update setting the specified path
to a specific Oid, whether it currently exists
or not.
Note that libgit2 does not support an upsert of a previously removed path, or an upsert that changes the type of an object (such as from tree to blob or vice versa).
pub fn create_updated(
&mut self,
repo: &Repository,
baseline: &Tree<'_>
) -> Result<Oid, Error>
pub fn create_updated(
&mut self,
repo: &Repository,
baseline: &Tree<'_>
) -> Result<Oid, Error>
Create a new tree from the specified baseline and this series of updates.
The baseline tree must exist in the specified repository.