]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/multi-pack-index.c: support `--stdin-packs` mode
authorTaylor Blau <me@ttaylorr.com>
Wed, 29 Sep 2021 01:55:04 +0000 (21:55 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 29 Sep 2021 04:20:55 +0000 (21:20 -0700)
commit6fb22ca463077a07f42675be52e68891f319b5c2
tree94ae60bd5cf107855df15f9fa3e743bb0af8e450
parent56d863e9799c9d440eba3e61346662745a58ab21
builtin/multi-pack-index.c: support `--stdin-packs` mode

To power a new `--write-midx` mode, `git repack` will want to write a
multi-pack index containing a certain set of packs in the repository.

This new option will be used by `git repack` to write a MIDX which
contains only the packs which will survive after the repack (that is, it
will exclude any packs which are about to be deleted).

This patch effectively exposes the function implemented in the previous
commit via the `git multi-pack-index` builtin. An alternative approach
would have been to call that function from the `git repack` builtin
directly, but this introduces awkward problems around closing and
reopening the object store, so the MIDX will be written out-of-process.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-multi-pack-index.txt
builtin/multi-pack-index.c
t/t5319-multi-pack-index.sh