]> git.ipfire.org Git - thirdparty/git.git/commit
repack-midx: factor out `repack_prepare_midx_command()`
authorTaylor Blau <me@ttaylorr.com>
Tue, 19 May 2026 15:58:03 +0000 (11:58 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 May 2026 02:31:14 +0000 (11:31 +0900)
commit1505990d72585cbdf35cd596a2167c2a8a4edda1
tree4a221d2c5d260c57aeb6621fd52299465a489182
parentee6fb5823822bb03bd8dc5b7e7645e5b319033f0
repack-midx: factor out `repack_prepare_midx_command()`

The `write_midx_included_packs()` function assembles and executes a
`git multi-pack-index write` command, constructing the argument list
inline.

Future commits will introduce additional callers that need to construct
similar `git multi-pack-index` commands (for both `write` and `compact`
subcommands), so extract the common portions of the command setup into a
reusable `repack_prepare_midx_command()` helper.

The extracted helper sets `git_cmd`, pushes `multi-pack-index` and a
subcommand, and handles `--progress`/`--no-progress` and `--bitmap`
flags. The remaining arguments that are specific to the `write`
subcommand (such as `--stdin-packs`) are left to the caller.

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