]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/maintenance: don't silently ignore invalid strategy
authorPatrick Steinhardt <ps@pks.im>
Fri, 24 Oct 2025 06:57:18 +0000 (08:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Oct 2025 20:42:43 +0000 (13:42 -0700)
commitd465be2327d934f3506d412cc4f4067baba0d1c5
treea60816a2521d9b75cd3652d49857113a058633e8
parent5c2ad50193896dc74e51e4b7a5af4ea734746316
builtin/maintenance: don't silently ignore invalid strategy

When parsing maintenance strategies we completely ignore the
user-configured value in case it is unknown to us. This makes it
basically undiscoverable to the user that scheduled maintenance is
devolving into a no-op.

Change this to instead die when seeing an unknown maintenance strategy.
While at it, pull out the parsing logic into a separate function so that
we can reuse it in a subsequent commit.

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