]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7900-maintenance.sh
Merge branch 'rs/maintenance-run-outside-repo'
[thirdparty/git.git] / t / t7900-maintenance.sh
index 8c061197a609f54c08d64c79d9c924269b40369b..e987b44f8787a4cd81ed0c5c427cb8a06b3d15f0 100755 (executable)
@@ -239,13 +239,15 @@ test_expect_success 'incremental-repack task' '
 '
 
 test_expect_success EXPENSIVE 'incremental-repack 2g limit' '
+       test_config core.compression 0 &&
+
        for i in $(test_seq 1 5)
        do
                test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
                return 1
        done &&
        git add big &&
-       git commit -m "Add big file (1)" &&
+       git commit -qm "Add big file (1)" &&
 
        # ensure any possible loose objects are in a pack-file
        git maintenance run --task=loose-objects &&
@@ -257,7 +259,7 @@ test_expect_success EXPENSIVE 'incremental-repack 2g limit' '
                return 1
        done &&
        git add big &&
-       git commit -m "Add big file (2)" &&
+       git commit -qm "Add big file (2)" &&
 
        # ensure any possible loose objects are in a pack-file
        git maintenance run --task=loose-objects &&
@@ -404,6 +406,18 @@ test_expect_success 'register and unregister' '
        test_cmp before actual
 '
 
+test_expect_success !MINGW 'register and unregister with regex metacharacters' '
+       META="a+b*c" &&
+       git init "$META" &&
+       git -C "$META" maintenance register &&
+       git config --get-all --show-origin maintenance.repo &&
+       git config --get-all --global --fixed-value \
+               maintenance.repo "$(pwd)/$META" &&
+       git -C "$META" maintenance unregister &&
+       test_must_fail git config --get-all --global --fixed-value \
+               maintenance.repo "$(pwd)/$META"
+'
+
 test_expect_success 'start from empty cron table' '
        GIT_TEST_CRONTAB="test-tool crontab cron.txt" git maintenance start &&