Packbuilder.create
var packbuilder = Packbuilder.create(repo);
Parameters | Type | |
---|---|---|
repo | Repository | The repository |
Returns | |
---|---|
Packbuilder | The new packbuilder object |
Packbuilder#hash
var oid = packbuilder.hash();
Returns | |
---|---|
Oid |
Packbuilder#insert
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
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
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
var result = packbuilder.insertTree(id);
Parameters | Type | |
---|---|---|
id | Oid | The oid of the root tree |
Returns | |
---|---|
Number | 0 or an error code |
Packbuilder#insertWalk
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
var result = packbuilder.objectCount();
Returns | |
---|---|
Number | the number of objects in the packfile |
Packbuilder#setThreads
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
var result = packbuilder.written();
Returns | |
---|---|
Number | the number of objects which have already been written |
Packbuilder.STAGE
Flag | Value |
---|---|
Packbuilder.STAGE.ADDING_OBJECTS | 0 |
Packbuilder.STAGE.DELTAFICATION | 1 |