]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/maintenance: mark "--task=" and "--schedule=" as incompatible
authorPatrick Steinhardt <ps@pks.im>
Tue, 3 Jun 2025 14:01:12 +0000 (16:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jun 2025 15:30:49 +0000 (08:30 -0700)
commita7c86d328ffe2d93cb1bfaf557dba7a2034ec17b
tree5fb0ee82f9638de600ee2f9992b00266b61d8931
parent1bb6bdb646583a2fc2e0e6436f5cdabdd4d14189
builtin/maintenance: mark "--task=" and "--schedule=" as incompatible

The "--task=" option explicitly allows the user to say which maintenance
tasks should be run, whereas "--schedule=" only respects the maintenance
strategy configured for a specific repository. As such, it is not
sensible to accept both options at the same time.

Mark them as incompatible with one another. While at it, also convert
the existing logic that marks "--auto" and "--schedule=" as incompatible
to use `die_for_incompatible_opt2()`.

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