pub struct MidxReuseTables {
pub oids: Vec<ObjectId>,
pub pack_and_offset: Vec<(u32, u64)>,
pub rid_order: Vec<u32>,
pub oid_idx_to_rank: Vec<u32>,
}Expand description
OID rows from the active multi-pack-index, plus reverse-index order for pack-reuse bitmap bits.
Git assigns each object a global bitmap bit equal to its position in the MIDX reverse index
(RIDX chunk) traversal order — not its position in the pack .idx file. Helpers on this struct
map ObjectId → global bit the same way as midx-write.c (midx_pack_order).
Fields§
§oids: Vec<ObjectId>OIDs in MIDX lexicographic order (same order as the OID lookup chunk).
pack_and_offset: Vec<(u32, u64)>(pack_int_id, in-pack offset) parallel to oids.
rid_order: Vec<u32>rid_order[rank] is the OID-table index of the object at global bitmap rank rank.
oid_idx_to_rank: Vec<u32>Inverse map: global bitmap rank for each OID-table index.
Implementations§
Source§impl MidxReuseTables
impl MidxReuseTables
Sourcepub fn global_bitmap_bit(&self, oid: &ObjectId) -> Option<u32>
pub fn global_bitmap_bit(&self, oid: &ObjectId) -> Option<u32>
Global pseudo-bitmap index for oid, or None if the object is not in this MIDX.
Sourcepub fn canonical_pack(&self, oid: &ObjectId) -> Option<u32>
pub fn canonical_pack(&self, oid: &ObjectId) -> Option<u32>
MIDX-canonical pack id for oid (the single copy the MIDX selected after deduplication),
or None if the object is not in this MIDX. Used to reject cross-pack delta reuse: a
delta is only reusable verbatim when its base resolves to the same pack the delta lives
in, mirroring Git’s midx_pair_to_pack_pos check in try_partial_reuse.
Trait Implementations§
Source§impl Clone for MidxReuseTables
impl Clone for MidxReuseTables
Source§fn clone(&self) -> MidxReuseTables
fn clone(&self) -> MidxReuseTables
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more