From c860afca6cb4757097ea7a8a8837bdbaa5a83a2d Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 21 Aug 2023 11:14:48 -0400 Subject: [PATCH] scalar: configure maintenance during 'reconfigure' The 'scalar reconfigure' command is intended to update registered repos with the latest settings available. However, up to now we were not reregistering the repos with background maintenance. In particular, this meant that the background maintenance schedule would not be updated if there are improvements between versions. Be sure to register repos for maintenance during the reconfigure step. Signed-off-by: Derrick Stolee --- scalar.c | 3 +++ t/t9210-scalar.sh | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scalar.c b/scalar.c index 142672976c6584..3030202c9794d4 100644 --- a/scalar.c +++ b/scalar.c @@ -1098,6 +1098,9 @@ static int cmd_reconfigure(int argc, const char **argv) if (set_recommended_config(1) < 0) failed = -1; + if (toggle_maintenance(1) < 0) + failed = -1; + loop_end: if (failed) { res = failed; diff --git a/t/t9210-scalar.sh b/t/t9210-scalar.sh index 43c4208cdc31b1..b3d220f948b268 100755 --- a/t/t9210-scalar.sh +++ b/t/t9210-scalar.sh @@ -176,8 +176,9 @@ test_expect_success 'scalar reconfigure' ' scalar reconfigure one && test true = "$(git -C one/src config core.preloadIndex)" && git -C one/src config core.preloadIndex false && - scalar reconfigure -a && - test true = "$(git -C one/src config core.preloadIndex)" + GIT_TRACE2_EVENT="$(pwd)/reconfigure" scalar reconfigure -a && + test true = "$(git -C one/src config core.preloadIndex)" && + test_subcommand git maintenance start