Expand description
Pack and pack-index helpers for object counting and verification.
This module implements a focused subset of pack functionality required by
count-objects, verify-pack, and show-index.
Structs§
- Local
Pack Info - Basic information about local packs.
- Pack
Index - Parsed data from a
.idxfile (version 2). - Pack
Index Entry - A parsed entry from an index file.
- Show
Index Entry - A single entry produced by
show-index, with an optional CRC32. - Verify
Object Record - A decoded object header record used by
verify-pack.
Enums§
- Packed
Type - A pack object type as encoded in the packed stream header.
Functions§
- collect_
local_ pack_ info - Collect aggregate local pack metrics.
- packed_
delta_ base_ oid - packed_
ref_ delta_ reuse_ slice - When
oidis stored as a delta in a pack, return its delta base object id. ReturnsNonefor loose objects and for non-delta packed objects. Ifoidis stored asREF_DELTAorOFS_DELTAin a local pack and its base OID is inpacked_set, return the base OID and the uncompressed delta payload (Git binary delta). - read_
alternates_ recursive - Read alternates recursively, deduplicated in discovery order.
- read_
idx_ object_ ids - Read all object IDs from a
.idxfile. - read_
local_ pack_ indexes - Read all valid
.idxfiles inobjects/pack. - read_
object_ from_ pack - Read an object from a pack file by its OID.
- read_
object_ from_ packs - Search all pack indexes in
objects_dirfor the given OID and read it. - read_
pack_ index - Parse a version-2 pack index file.
- show_
index_ entries - Parse a pack index from a reader (e.g. stdin) and return all entries in index order.
- skip_
one_ pack_ object - Advance
pospast one packed object (including zlib payload). - verify_
pack_ and_ collect - Verify one pack/index pair and optionally return object records.