Skip to main content

Module pack_geometry

Module pack_geometry 

Source
Expand description

Pack geometry for git repack --geometric (factor-based progression).

Mirrors the split logic in Git’s repack-geometry.c: packs are weighted by object count from their index, sorted ascending, then a split index separates packs that will be rolled into a new pack from those retained.

Structs§

GeometricPack
One local pack considered for geometric repacking.

Functions§

collect_geometry_packs
Load eligible non-promisor packs from objects_dir/pack for geometry.
collect_promisor_geometry_packs
Promisor packs only (sibling .promisor marker), for a second geometry pass.
compute_geometry_split
Split packs into “roll up” vs “keep” using Git’s geometric progression rules.
preferred_pack_stem_after_split
Preferred pack stem (largest retained non-promisor pack), for MIDX --preferred-pack.