Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2023-01-27 23:06:03 +0300
committerJunio C Hamano <gitster@pobox.com>2023-01-27 23:38:26 +0300
commitdea63088928cde2fd264a852a9b14c05178e0838 (patch)
tree40ba5f067191ccd6a520732eadde01a9fbf15209 /t/t9211-scalar-clone.sh
parenteeea9ae1657e32ee16f8452ff201b2ca54d51641 (diff)
scalar: only warn when background maintenance fails
A user reported issues with 'scalar clone' and 'scalar register' when working in an environment that had locked down the ability to run 'crontab' or 'systemctl' in that those commands registered as _failures_ instead of opportunistically reporting a success with just a warning about background maintenance. As a workaround, they can use GIT_TEST_MAINT_SCHEDULER to fake a successful background maintenance, but this is not a viable strategy for long-term. Update 'scalar register' and 'scalar clone' to no longer fail by modifying register_dir() to only warn when toggle_maintenance(1) fails. Since background maintenance is a "nice to have" and not a requirement for a working repository, it is best to move this from hard error to gentle warning. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9211-scalar-clone.sh')
-rwxr-xr-xt/t9211-scalar-clone.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t9211-scalar-clone.sh b/t/t9211-scalar-clone.sh
index a6156da29a..872ad1c9c2 100755
--- a/t/t9211-scalar-clone.sh
+++ b/t/t9211-scalar-clone.sh
@@ -174,9 +174,9 @@ test_expect_success 'progress without tty' '
cleanup_clone $enlistment
'
-test_expect_success 'scalar clone fails when background maintenance fails' '
+test_expect_success 'scalar clone warns when background maintenance fails' '
GIT_TEST_MAINT_SCHEDULER="crontab:false,launchctl:false,schtasks:false" \
- test_must_fail scalar clone "file://$(pwd)/to-clone" maint-fail 2>err &&
+ scalar clone "file://$(pwd)/to-clone" maint-fail 2>err &&
grep "could not turn on maintenance" err
'