Treebuilder.create Async

Treebuilder.create(repo, source).then(function(treebuilder) {
  // Use treebuilder
});
Parameters Type  
repo Repository Repository in which to store the object
source Tree Source tree to initialize the builder (optional)
Returns  
Treebuilder the tree builder

Treebuilder#clear Sync

treebuilder.clear();

Treebuilder#entrycount Sync

var result = treebuilder.entrycount();
Returns  
Number the number of entries in the treebuilder

Treebuilder#get Sync

var treeEntry = treebuilder.get(filename);
Parameters Type  
filename String Name of the entry
Returns  
TreeEntry  

Treebuilder#insert Sync

var treeEntry = treebuilder.insert(filename, id, filemode);
Parameters Type  
filename String Filename of the entry
id Oid SHA1 oid of the entry
filemode Number Folder attributes of the entry. This parameter must be valued with one of the following entries: 0040000, 0100644, 0100755, 0120000 or 0160000.
Returns  
TreeEntry  

Treebuilder#remove Sync

var result = treebuilder.remove(filename);
Parameters Type  
filename String Filename of the entry to remove
Returns  
Number  

Treebuilder#write Async

treebuilder.write().then(function(oid) {
  // Use oid
});
Returns  
Oid