]> git.ipfire.org Git - thirdparty/git.git/commit
midx-write.c: extract `fill_pack_from_midx()`
authorTaylor Blau <me@ttaylorr.com>
Wed, 14 Jan 2026 19:54:55 +0000 (14:54 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Jan 2026 20:52:59 +0000 (12:52 -0800)
commite59b7b8756ce1f125391f4c862f73e243e1f086a
tree76a4385731d83590506ee9a7e24f2a1490bad19e
parentb39598a039548724841995b84f1364c52001d8a7
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