]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/gc: add a `--detach` flag
authorPatrick Steinhardt <ps@pks.im>
Fri, 16 Aug 2024 10:45:11 +0000 (12:45 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Aug 2024 16:46:25 +0000 (09:46 -0700)
commitc7185df01bb68091d3bdea2fe192f4b34e169c9d
tree415cf2eaa4143e581b5ff6a9d3f535c2b5266488
parent9b6b994f90f4427a0ddef38594036055e7b0efa1
builtin/gc: add a `--detach` flag

When running `git gc --auto`, the command will by default detach and
continue running in the background. This behaviour can be tweaked via
the `gc.autoDetach` config, but not via a command line switch. We need
that in a subsequent commit though, where git-maintenance(1) will want
to ask its git-gc(1) child process to not detach anymore.

Add a `--[no-]detach` flag that does this for us.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-gc.txt
builtin/gc.c
t/t6500-gc.sh