Packbuilder.create Sync

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

Packbuilder#free Sync

packbuilder.free();

Packbuilder#hash Sync

var oid = packbuilder.hash();
Returns  
Oid  

Packbuilder#insert Sync

var result = packbuilder.insert(id, name);
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 Sync

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

Packbuilder#insertRecur Sync

var result = packbuilder.insertRecur(id, name);
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 Sync

var result = packbuilder.insertWalk(walk);
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