Packbuilder.create Sync

var packbuilder = Packbuilder.create(repo);
Parameters Type  
repo Repository The repository
Returns  
Packbuilder The new packbuilder object

Packbuilder#hash Sync

var oid = packbuilder.hash();
Returns  
Oid  

Packbuilder#insert Async

packbuilder.insert(id, name).then(function(result) {
  // Use result
});
Parameters Type  
id Oid The oid of the commit
name String The name; might be NULL
Returns  
Number 0 or an error code

Packbuilder#insertCommit Async

packbuilder.insertCommit(id).then(function(result) {
  // Use result
});
Parameters Type  
id Oid The oid of the commit
Returns  
Number 0 or an error code

Packbuilder#insertRecur Async

packbuilder.insertRecur(id, name).then(function(result) {
  // Use result
});
Parameters Type  
id Oid the id of the root object to insert
name String optional name for the object
Returns  
Number 0 or an error code

Packbuilder#insertTree Sync

var result = packbuilder.insertTree(id);
Parameters Type  
id Oid The oid of the root tree
Returns  
Number 0 or an error code

Packbuilder#insertWalk Async

packbuilder.insertWalk(walk).then(function(result) {
  // Use result
});
Parameters Type  
walk Revwalk the revwalk to use to fill the packbuilder
Returns  
Number 0 or an error code

Packbuilder#objectCount Sync

var result = packbuilder.objectCount();
Returns  
Number the number of objects in the packfile

Packbuilder#setThreads Sync

var result = packbuilder.setThreads(n);
Parameters Type  
n Number Number of threads to spawn
Returns  
Number number of actual threads to be used

Packbuilder#written Sync

var result = packbuilder.written();
Returns  
Number the number of objects which have already been written

Packbuilder.STAGE ENUM

Flag Value
Packbuilder.STAGE.ADDING_OBJECTS 0
Packbuilder.STAGE.DELTAFICATION 1