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>
This commit is contained in:
committed by
Junio C Hamano
parent
eeea9ae165
commit
dea6308892
2
scalar.c
2
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"));
|
||||
|
||||
Reference in New Issue
Block a user