Skip to main content

Module unpack_objects

Module unpack_objects 

Source
Expand description

Unpack loose objects from pack streams.

Structs§

IngestedObjects
Objects a pack stream delivered into an object store, from ingest_pack_into.
PackIndexRecord
Resolved (oid, pack_offset) pairs for every object slot in a pack byte stream.
UnpackOptions
Options controlling unpack-objects behaviour.

Functions§

apply_delta
Apply a git “patch delta” to base, producing the patched result.
apply_delta_into
Apply delta onto base, reusing out storage (cleared first, capacity grown as needed).
ingest_pack_into
Apply a pack stream to any WritableObjectStore, resolving every delta.
ingest_pack_into_with_progress
Like ingest_pack_into, reporting ProgressPhase::IndexingObjects and ProgressPhase::ResolvingDeltas on progress and stopping with Error::Cancelled once cancel fires.
pack_bytes_to_object_map
Parse a pack byte stream and return every resolved object (after delta resolution) keyed by OID.
pack_index_records_from_bytes
Build index records using the repository’s default parallelism (pack.threads when unset).
pack_index_records_with_threads
Build index records with an explicit worker thread count (None/0 → available CPUs).
pack_index_records_with_threads_with_progress
Like pack_index_records_with_threads, reporting indexing and delta resolution progress on progress when provided.
pack_is_thin
Whether data is a thin pack — i.e. it contains a ref-delta (type 7) whose base object is not itself present in the pack. git pack-objects --thin produces such packs; a receiver that rejects thin packs (receive-pack --reject-thin-pack-for-testing) uses this to refuse them.
strict_verify_packed_references
Verifies that references from commits, trees, and tags resolve to objects present in pack or, when odb is Some, to loose objects in that database.
unpack_objects
Unpack a pack stream from reader into odb.