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
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-12-24 00:59:46 +0300
committerJunio C Hamano <gitster@pobox.com>2020-12-24 00:59:46 +0300
commit7a5026529529e811b41de02ca12aa6c8ff3d11c5 (patch)
treec21a12770bad4b904073dab1a93c152e609d95e2 /t
parent04cd9996383791cde0e866eb96e516f7646227c3 (diff)
parenta52df25a546e33e76c3ddeff66545e4437249290 (diff)
Merge branch 'ma/maintenance-crontab-fix'
Hotfix for a topic of this cycle. * ma/maintenance-crontab-fix: t7900-maintenance: test for magic markers gc: fix handling of crontab magic markers git-maintenance.txt: add missing word
Diffstat (limited to 't')
-rwxr-xr-xt/t7900-maintenance.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index d1e0c8f830..99bf0c7582 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -446,6 +446,22 @@ test_expect_success 'start preserves existing schedule' '
grep "Important information!" cron.txt
'
+test_expect_success 'magic markers are correct' '
+ grep "GIT MAINTENANCE SCHEDULE" cron.txt >actual &&
+ cat >expect <<-\EOF &&
+ # BEGIN GIT MAINTENANCE SCHEDULE
+ # END GIT MAINTENANCE SCHEDULE
+ EOF
+ test_cmp actual expect
+'
+
+test_expect_success 'stop preserves surrounding schedule' '
+ echo "Crucial information!" >>cron.txt &&
+ GIT_TEST_CRONTAB="test-tool crontab cron.txt" git maintenance stop &&
+ grep "Important information!" cron.txt &&
+ grep "Crucial information!" cron.txt
+'
+
test_expect_success 'register preserves existing strategy' '
git config maintenance.strategy none &&
git maintenance register &&