]> git.ipfire.org Git - thirdparty/git.git/commit
gc: add `gc.repackFilter` config option
authorChristian Couder <christian.couder@gmail.com>
Mon, 2 Oct 2023 16:55:02 +0000 (18:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Oct 2023 21:54:30 +0000 (14:54 -0700)
commit1cd43a9ed96831b983fada37a71daacb6be373dc
tree8dc11eee02d8ca8bd1de7f9994918448a5c11ec8
parent48a9b67b4301083d0820e90afef208ed1436298f
gc: add `gc.repackFilter` config option

A previous commit has implemented `git repack --filter=<filter-spec>` to
allow users to filter out some objects from the main pack and move them
into a new different pack.

Users might want to perform such a cleanup regularly at the same time as
they perform other repacks and cleanups, so as part of `git gc`.

Let's allow them to configure a <filter-spec> for that purpose using a
new gc.repackFilter config option.

Now when `git gc` will perform a repack with a <filter-spec> configured
through this option and not empty, the repack process will be passed a
corresponding `--filter=<filter-spec>` argument.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/gc.txt
builtin/gc.c
t/t6500-gc.sh