summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-09-08 13:30:29 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-08 13:30:29 -0700
commit4293c057dcc8a8806d158a4c1f27deca34245558 (patch)
treeeb871e35d93ce1245726aad1c05b6062dd0d113a /t
parentMerge branch 'ab/rebase-fatal-fatal-fix' (diff)
parentmaintenance: skip bootout/bootstrap when plist is registered (diff)
downloadtgif-4293c057dcc8a8806d158a4c1f27deca34245558.tar.xz
Merge branch 'js/maintenance-launchctl-fix'
"git maintenance" scheduler fix for macOS. * js/maintenance-launchctl-fix: maintenance: skip bootout/bootstrap when plist is registered maintenance: create `launchctl` configuration using a lock file
Diffstat (limited to 't')
-rwxr-xr-xt/t7900-maintenance.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index 58f46c77e6..fc16ac2258 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -582,6 +582,23 @@ test_expect_success 'start and stop macOS maintenance' '
test_line_count = 0 actual
'
+test_expect_success 'use launchctl list to prevent extra work' '
+ # ensure we are registered
+ GIT_TEST_MAINT_SCHEDULER=launchctl:./print-args git maintenance start &&
+
+ # do it again on a fresh args file
+ rm -f args &&
+ GIT_TEST_MAINT_SCHEDULER=launchctl:./print-args git maintenance start &&
+
+ ls "$HOME/Library/LaunchAgents" >actual &&
+ cat >expect <<-\EOF &&
+ list org.git-scm.git.hourly
+ list org.git-scm.git.daily
+ list org.git-scm.git.weekly
+ EOF
+ test_cmp expect args
+'
+
test_expect_success 'start and stop Windows maintenance' '
write_script print-args <<-\EOF &&
echo $* >>args