]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t7900: use --fixed-value in git-maintenance tests
authorJosh Steadmon <steadmon@google.com>
Wed, 9 Dec 2020 19:16:16 +0000 (11:16 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Dec 2020 00:25:20 +0000 (16:25 -0800)
Use --fixed-value in git-config calls in the git-maintenance tests, so
that the tests will continue to work even if the repo path contains
regexp metacharacters.

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7900-maintenance.sh

index ee91a714b9325fa021d93f6859cd1c7139e8153f..e4fcee8686ac2a0e0733bdaa82766d4296286a56 100755 (executable)
@@ -420,7 +420,7 @@ test_expect_success 'start from empty cron table' '
        GIT_TEST_CRONTAB="test-tool crontab cron.txt" git maintenance start &&
 
        # start registers the repo
-       git config --get --global maintenance.repo "$(pwd)" &&
+       git config --get --global --fixed-value maintenance.repo "$(pwd)" &&
 
        grep "for-each-repo --config=maintenance.repo maintenance run --schedule=daily" cron.txt &&
        grep "for-each-repo --config=maintenance.repo maintenance run --schedule=hourly" cron.txt &&
@@ -431,7 +431,7 @@ test_expect_success 'stop from existing schedule' '
        GIT_TEST_CRONTAB="test-tool crontab cron.txt" git maintenance stop &&
 
        # stop does not unregister the repo
-       git config --get --global maintenance.repo "$(pwd)" &&
+       git config --get --global --fixed-value maintenance.repo "$(pwd)" &&
 
        # Operation is idempotent
        GIT_TEST_CRONTAB="test-tool crontab cron.txt" git maintenance stop &&