]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/gc: forward git-gc(1)'s `--auto` flag when packing refs
authorPatrick Steinhardt <ps@pks.im>
Mon, 25 Mar 2024 10:03:32 +0000 (11:03 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Mar 2024 16:54:07 +0000 (09:54 -0700)
commitbfc2f9eb8e83f394cc397f978c833edced507923
treea8eb857a4de1286dcff6967887f315487e8cbf3b
parent77257e3c7e342acc0022c8c206db6c248cbfeb85
builtin/gc: forward git-gc(1)'s `--auto` flag when packing refs

Forward the `--auto` flag to git-pack-refs(1) when it has been invoked
with this flag itself. This does not change anything for the "files"
backend, which will continue to eagerly pack refs. But it does ensure
that the "reftable" backend only compacts refs as required.

This change does not impact git-maintenance(1) because this command will
in fact never run the pack-refs task when run with `--auto`. This issue
will be addressed in a subsequent commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/gc.c
t/t0610-reftable-basics.sh