]> git.ipfire.org Git - thirdparty/git.git/commit
repack-geometry: prepare for incremental MIDX repacking
authorTaylor Blau <me@ttaylorr.com>
Tue, 19 May 2026 15:58:10 +0000 (11:58 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 May 2026 02:31:14 +0000 (11:31 +0900)
commitd0ac3969f4b8a859d23c9f45cab873cbbf8cdfb8
tree07ff5a49e34c8c2c2b7af2c2257628444b05b795
parent6e38bcc51014e89a430bbd4f708170f5f7795b76
repack-geometry: prepare for incremental MIDX repacking

Teach `pack_geometry_init()` to optionally restrict the set of
repacking candidates to only packs in the tip MIDX layer when a
`midx_layer_threshold` is configured. If the tip layer has fewer packs
than the threshold, those packs are excluded entirely; otherwise only
packs in that layer participate in the geometric repack.

Also track whether any tip-layer packs were included in the rollup
(`midx_tip_rewritten`), which a subsequent commit will use to decide
how to update the MIDX chain after repacking.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
repack-geometry.c
repack.h