]> git.ipfire.org Git - thirdparty/git.git/commit
midx-write.c: extract `fill_pack_from_midx()`
authorTaylor Blau <me@ttaylorr.com>
Tue, 24 Feb 2026 19:00:21 +0000 (14:00 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Feb 2026 19:16:34 +0000 (11:16 -0800)
commit5f3e7f7279da72b20f99a2bcd26d146f7edaef9d
tree3bc7113ec1f309e917e5c4966c75bd98e88c4ca1
parent4f8543255efc3cc1d5247fa16a9f7597ad565993
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