]> git.ipfire.org Git - thirdparty/git.git/commit
repack-midx: extract `repack_fill_midx_stdin_packs()`
authorTaylor Blau <me@ttaylorr.com>
Tue, 19 May 2026 15:58:07 +0000 (11:58 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 May 2026 02:31:14 +0000 (11:31 +0900)
commit6e38bcc51014e89a430bbd4f708170f5f7795b76
tree702169fc1307ee444833f6af214f30dd50abd7dc
parent1505990d72585cbdf35cd596a2167c2a8a4edda1
repack-midx: extract `repack_fill_midx_stdin_packs()`

The function `write_midx_included_packs()` manages the lifecycle of
writing packs to stdin when running `git multi-pack-index write` as a
child process.

Extract a standalone `repack_fill_midx_stdin_packs()` helper, which
handles `--stdin-packs` argument setup, starting the command, writing
pack names to its standard input, and finishing the command.

This simplifies `write_midx_included_packs()` and prepares for a
subsequent commit where the same helper is called with `cmd->out = -1`
to capture the MIDX's checksum from the command's standard output,
which is needed when writing MIDX layers with `--no-write-chain-file`.

No functional changes are included in this patch.

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