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 /scalar.c
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 'scalar.c')
-rw-r--r--scalar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scalar.c b/scalar.c
index f25d5f1d0e..ca19b95ce4 100644
--- a/scalar.c
+++ b/scalar.c
@@ -262,7 +262,7 @@ static int register_dir(void)
return error(_("could not set recommended config"));
if (toggle_maintenance(1))
- return error(_("could not turn on maintenance"));
+ warning(_("could not turn on maintenance"));
if (have_fsmonitor_support() && start_fsmonitor_daemon()) {
return error(_("could not start the FSMonitor daemon"));