Class TreeCreator
- java.lang.Object
- 
- com.google.gerrit.server.edit.tree.TreeCreator
 
- 
 public class TreeCreator extends Object A creator for a new Git tree. To create the new tree, the tree of another commit is taken as a basis and modified.
- 
- 
Constructor SummaryConstructors Constructor Description TreeCreator(org.eclipse.jgit.revwalk.RevCommit baseCommit)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTreeModifications(List<TreeModification> treeModifications)Apply modifications to the tree which is taken as a basis.org.eclipse.jgit.lib.ObjectIdcreateNewTreeAndGetId(org.eclipse.jgit.lib.Repository repository)Creates the new tree.
 
- 
- 
- 
Method Detail- 
addTreeModificationspublic void addTreeModifications(List<TreeModification> treeModifications) Apply modifications to the tree which is taken as a basis. If this method is called multiple times, the modifications are applied subsequently in exactly the order they were provided.- Parameters:
- treeModifications- modifications which should be applied to the base tree
 
 - 
createNewTreeAndGetIdpublic org.eclipse.jgit.lib.ObjectId createNewTreeAndGetId(org.eclipse.jgit.lib.Repository repository) throws IOExceptionCreates the new tree. When this method is called, the specified base tree is read from the repository, the specified modifications are applied, and the resulting tree is written to the object store of the repository.- Parameters:
- repository- the affected Git repository
- Returns:
- the ObjectIdof the created tree
- Throws:
- IOException- if problems arise when accessing the repository
 
 
- 
 
-