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>2021-02-18 04:21:42 +0300
committerJunio C Hamano <gitster@pobox.com>2021-02-18 04:21:42 +0300
commitd494433d26bf955091bd3221d30d6ac85272fc72 (patch)
tree064987e24606f88063b9987c0a458e113bfdb198 /t
parentfdf3a27ca9f44d0c5597b2d1a018b02f09ba8602 (diff)
parentacc1c4d5d4c80c4fd93aaa151caa5593656600ae (diff)
Merge branch 'ds/maintenance-pack-refs'
"git maintenance" tool learned a new "pack-refs" maintenance task. * ds/maintenance-pack-refs: maintenance: incremental strategy runs pack-refs weekly maintenance: add pack-refs task
Diffstat (limited to 't')
-rwxr-xr-xt/t7900-maintenance.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index 78ccf4b33f..286b18db3c 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -343,6 +343,18 @@ test_expect_success 'maintenance.incremental-repack.auto' '
test_subcommand git multi-pack-index write --no-progress <trace-B
'
+test_expect_success 'pack-refs task' '
+ for n in $(test_seq 1 5)
+ do
+ git branch -f to-pack/$n HEAD || return 1
+ done &&
+ GIT_TRACE2_EVENT="$(pwd)/pack-refs.txt" \
+ git maintenance run --task=pack-refs &&
+ ls .git/refs/heads/ >after &&
+ test_must_be_empty after &&
+ test_subcommand git pack-refs --all --prune <pack-refs.txt
+'
+
test_expect_success '--auto and --schedule incompatible' '
test_must_fail git maintenance run --auto --schedule=daily 2>err &&
test_i18ngrep "at most one" err
@@ -396,18 +408,32 @@ test_expect_success 'maintenance.strategy inheritance' '
git maintenance run --schedule=hourly --quiet &&
GIT_TRACE2_EVENT="$(pwd)/incremental-daily.txt" \
git maintenance run --schedule=daily --quiet &&
+ GIT_TRACE2_EVENT="$(pwd)/incremental-weekly.txt" \
+ git maintenance run --schedule=weekly --quiet &&
test_subcommand git commit-graph write --split --reachable \
--no-progress <incremental-hourly.txt &&
test_subcommand ! git prune-packed --quiet <incremental-hourly.txt &&
test_subcommand ! git multi-pack-index write --no-progress \
<incremental-hourly.txt &&
+ test_subcommand ! git pack-refs --all --prune \
+ <incremental-hourly.txt &&
test_subcommand git commit-graph write --split --reachable \
--no-progress <incremental-daily.txt &&
test_subcommand git prune-packed --quiet <incremental-daily.txt &&
test_subcommand git multi-pack-index write --no-progress \
<incremental-daily.txt &&
+ test_subcommand ! git pack-refs --all --prune \
+ <incremental-daily.txt &&
+
+ test_subcommand git commit-graph write --split --reachable \
+ --no-progress <incremental-weekly.txt &&
+ test_subcommand git prune-packed --quiet <incremental-weekly.txt &&
+ test_subcommand git multi-pack-index write --no-progress \
+ <incremental-weekly.txt &&
+ test_subcommand git pack-refs --all --prune \
+ <incremental-weekly.txt &&
# Modify defaults
git config maintenance.commit-graph.schedule daily &&