aboutsummaryrefslogtreecommitdiffstats
path: root/t/t9211-scalar-clone.sh
diff options
context:
space:
mode:
authorDerrick Stolee <stolee@gmail.com>2025-05-07 01:50:36 +0000
committerJunio C Hamano <gitster@pobox.com>2025-05-07 14:04:31 -0700
commit882ce0c475167039ca368d34699e113042ea47ae (patch)
treecee7ec9bc0986fb43ced77df5d91de36b5088f44 /t/t9211-scalar-clone.sh
parent9816e24a78e3973164f324d50caa948ecfa2ab81 (diff)
downloadgit-882ce0c475167039ca368d34699e113042ea47ae.tar.gz
scalar clone: add --no-maintenance option
When creating a new enlistment via 'scalar clone', the default is to set up situations that work for most user scenarios. Background maintenance is one of those highly-recommended options for most users. However, when using 'scalar clone' to create an enlistment in a different situation, such as prepping a VM image, it may be valuable to disable background maintenance so the manual maintenance steps do not get blocked by concurrent background maintenance activities. Add a new --no-maintenance option to 'scalar clone'. Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9211-scalar-clone.sh')
-rwxr-xr-xt/t9211-scalar-clone.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/t9211-scalar-clone.sh b/t/t9211-scalar-clone.sh
index 01f71910f5..bfbf22a462 100755
--- a/t/t9211-scalar-clone.sh
+++ b/t/t9211-scalar-clone.sh
@@ -177,7 +177,16 @@ test_expect_success 'progress without tty' '
test_expect_success 'scalar clone warns when background maintenance fails' '
GIT_TEST_MAINT_SCHEDULER="crontab:false,launchctl:false,schtasks:false" \
scalar clone "file://$(pwd)/to-clone" maint-fail 2>err &&
- grep "could not turn on maintenance" err
+ grep "could not toggle maintenance" err
+'
+
+test_expect_success 'scalar clone --no-maintenance' '
+ GIT_TEST_MAINT_SCHEDULER="crontab:false,launchctl:false,schtasks:false" \
+ GIT_TRACE2_EVENT="$(pwd)/no-maint.event" \
+ GIT_TRACE2_EVENT_DEPTH=100 \
+ scalar clone --no-maintenance "file://$(pwd)/to-clone" no-maint 2>err &&
+ ! grep "could not toggle maintenance" err &&
+ test_subcommand ! git maintenance unregister --force <no-maint.event
'
test_expect_success '`scalar clone --no-src`' '