26 Packbuilder
(require libgit2/include/packbuilder) | package: libgit2 |
procedure
(git_packbuilder_foreach pb cb payload) → integer?
pb : packbuilder? cb : git_packbuilder_foreach_cb payload : bytes?
procedure
(git_packbuilder_free pb) → void?
pb : packbuilder?
A packfile’s name is derived from the sorted hashing of all object names. This is only correct after the packfile has been written.
For an optimal pack it’s mandatory to insert objects in recency order, commits followed by trees and blobs.
procedure
(git_packbuilder_insert_commit pb id) → integer?
pb : packbuilder? id : oid?
This will add a commit as well as the completed referenced tree.
procedure
(git_packbuilder_insert_recur pb id name) → integer?
pb : packbuilder? id : oid? name : string?
Insert the object as well as any object it references.
procedure
(git_packbuilder_insert_tree pb id) → integer?
pb : packbuilder? id : oid?
This will add the tree as well as all referenced trees and blobs.
procedure
(git_packbuilder_insert_walk pb walk) → integer?
pb : packbuilder? walk : revwalk?
Those commits and all objects they reference will be inserted into the packbuilder.
procedure
(git_packbuilder_object_count pb) → integer?
pb : packbuilder?
procedure
(git_packbuilder_set_callbacks pb progress_cb progress_cb_payload) → integer? pb : packbuilder? progress_cb : git_packbuilder_progress progress_cb_payload : bytes?
By default, libgit2 won’t spawn any threads at all; when set to 0, libgit2 will autodetect the number of CPUs.
procedure
(git_packbuilder_write pb path mode progress_cb progress_cb_payload) → integer? pb : packbuilder? path : string? mode : integer? progress_cb : git_transfer_progress_cb progress_cb_payload : bytes?
procedure
(git_packbuilder_written pb) → integer?
pb : packbuilder?