]> git.ipfire.org Git - thirdparty/git.git/commit
repack: add --name-hash-version option
authorDerrick Stolee <stolee@gmail.com>
Mon, 27 Jan 2025 19:02:30 +0000 (19:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Jan 2025 21:21:43 +0000 (13:21 -0800)
commit928ef41dd879a1e12373842e865477e9e1167621
tree59d8ea4367a4381391f6a5c007f0775efc58cdcb
parentfc62e033cd93ff6b93e312d89bfb5683a4c6f90c
repack: add --name-hash-version option

The new '--name-hash-version' option for 'git repack' is a simple
pass-through to the underlying 'git pack-objects' subcommand. However,
this subcommand may have other options and a temporary filename as part
of the subcommand execution that may not be predictable or could change
over time.

The existing test_subcommand method requires an exact list of arguments
for the subcommand. This is too rigid for our needs here, so create a
new method, test_subcommand_flex. Use it to check that the
--name-hash-version option is passing through.

Since we are modifying the 'git repack' command, let's bring its usage
in line with the Documentation's synopsis. This removes it from the
allow list in t0450 so it will remain in sync in the future.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-repack.txt
builtin/repack.c
t/t0450/txt-help-mismatches
t/t7700-repack.sh
t/test-lib-functions.sh