aboutsummaryrefslogtreecommitdiffstats
path: root/t/t9210-scalar.sh
diff options
context:
space:
mode:
authorDerrick Stolee <stolee@gmail.com>2025-05-07 01:50:37 +0000
committerJunio C Hamano <gitster@pobox.com>2025-05-07 14:04:32 -0700
commita34fef86e09f4dfe8b1198dd56e0631d24302b0e (patch)
tree1fe94344d8e391ef8fffc6b5b3cd166ca78f8095 /t/t9210-scalar.sh
parent882ce0c475167039ca368d34699e113042ea47ae (diff)
downloadgit-a34fef86e09f4dfe8b1198dd56e0631d24302b0e.tar.gz
scalar reconfigure: add --maintenance=<mode> option
When users want to enable the latest and greatest configuration options recommended by Scalar after a Git upgrade, 'scalar reconfigure --all' is a great option that iterates over all repos in the multi-valued 'scalar.repos' config key. However, this feature previously forced users to enable background maintenance. In some environments this is not preferred. Add a new --maintenance=<mode> option to 'scalar reconfigure' that provides options for enabling (default), disabling, or leaving background maintenance config as-is. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9210-scalar.sh')
-rwxr-xr-xt/t9210-scalar.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/t/t9210-scalar.sh b/t/t9210-scalar.sh
index 89a6a2a24d..bd6f0c40d2 100755
--- a/t/t9210-scalar.sh
+++ b/t/t9210-scalar.sh
@@ -210,7 +210,18 @@ test_expect_success 'scalar reconfigure' '
GIT_TRACE2_EVENT="$(pwd)/reconfigure" scalar reconfigure -a &&
test_path_is_file one/src/cron.txt &&
test true = "$(git -C one/src config core.preloadIndex)" &&
- test_subcommand git maintenance start <reconfigure
+ test_subcommand git maintenance start <reconfigure &&
+ test_subcommand ! git maintenance unregister --force <reconfigure &&
+
+ GIT_TRACE2_EVENT="$(pwd)/reconfigure-maint-disable" \
+ scalar reconfigure -a --maintenance=disable &&
+ test_subcommand ! git maintenance start <reconfigure-maint-disable &&
+ test_subcommand git maintenance unregister --force <reconfigure-maint-disable &&
+
+ GIT_TRACE2_EVENT="$(pwd)/reconfigure-maint-keep" \
+ scalar reconfigure --maintenance=keep -a &&
+ test_subcommand ! git maintenance start <reconfigure-maint-keep &&
+ test_subcommand ! git maintenance unregister --force <reconfigure-maint-keep
'
test_expect_success 'scalar reconfigure --all with includeIf.onbranch' '