]> git.ipfire.org Git - thirdparty/git.git/commit
midx-write.c: extract `fill_pack_from_midx()`
authorTaylor Blau <me@ttaylorr.com>
Sat, 6 Dec 2025 20:31:34 +0000 (15:31 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sat, 6 Dec 2025 22:38:09 +0000 (07:38 +0900)
commit9ced91c83b8effe8d8d73961c46b43f5399598bb
treed131220a9e7ef5c94f1da0877011407b9e5c86c7
parent363485a3111e025135c552b877d7b0f58bde8c6d
midx-write.c: extract `fill_pack_from_midx()`

When filling packs from an existing MIDX, `fill_packs_from_midx()`
handles preparing a MIDX'd pack, and reading out its pack name from the
existing MIDX.

MIDX compaction will want to perform an identical operation, though the
caller will look quite different than `fill_packs_from_midx()`. To
reduce any future code duplication, extract `fill_pack_from_midx()`
from `fill_packs_from_midx()` to prepare to call our new helper function
in a future change.

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