]> Kevux Git Server - rit/commit
builtin/repack.c: remove ref snapshotting from builtin
authorTaylor Blau <me@ttaylorr.com>
Wed, 15 Oct 2025 22:28:50 +0000 (18:28 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Oct 2025 17:08:55 +0000 (10:08 -0700)
commitccb7f822d520472026a12250e1390683706a8154
treedf05a19f4a70bd32caa06fcc65f981fe5dc14509
parent62d3fa09b3890631af7c572cb6132088a14d2653
builtin/repack.c: remove ref snapshotting from builtin

When writing a MIDX, 'git repack' takes a snapshot of the repository's
references and writes the result out to a file, which it then passes to
'git multi-pack-index write' via the '--refs-snapshot'.

This is done in order to make bitmap selections with respect to what we
are packing, thus avoiding a race where an incoming reference update
causes us to try and write a bitmap for a commit not present in the
MIDX.

Extract this functionality out into a new repack-midx.c compilation
unit, and expose the necessary functions via the repack.h API.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
builtin/repack.c
meson.build
repack-midx.c [new file with mode: 0644]
repack.h