t: disable maintenance where we verify object database structure

We have a couple of tests that explicitly verify the structure of the object database. Naturally, this structure is dependent on whether or not we run repository maintenance: if it decides to optimize the object database the expected structure is likely to not materialize. Explicitly disable auto-maintenance in such tests so that we are not dependent on decisions made by our maintenance. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Patrick Steinhardt committed Feb 24, 2026 at 09:45 UTC 5e6c61272023750253da2ef9d45dbd2c2bb7b469
11 files changed +17 -3
t/t0081-find-pack.sh
+1
@@ -68,6 +68,7 @@ test_expect_success 'add more packfiles' '
68 '
69
70 test_expect_success 'add more commits (as loose objects)' '
71 + test_config maintenance.auto false &&
72 test_commit six &&
73 test_commit seven &&
74
t/t5316-pack-delta-depth.sh
+1
@@ -48,6 +48,7 @@ test_description='pack-objects breaks long cross-pack delta chains'
48 # repeatedly-modified file to generate the delta chain).
49
50 test_expect_success 'create series of packs' '
51 + test_config maintenance.auto false &&
52 test-tool genrandom foo 4096 >content &&
53 prev= &&
54 for i in $(test_seq 1 10)
t/t5319-multi-pack-index.sh
+1
@@ -1315,6 +1315,7 @@ test_expect_success 'bitmapped packs are stored via the BTMP chunk' '
1315 git init repo &&
1316 (
1317 cd repo &&
1318 + git config set maintenance.auto false &&
1319
1320 for i in 1 2 3 4 5
1321 do
t/t5326-multi-pack-bitmaps.sh
+2 -1
@@ -93,7 +93,8 @@ test_midx_bitmap_cases () {
93 test_expect_success 'setup test_repository' '
94 rm -rf * .git &&
95 git init &&
96 - git config pack.writeBitmapLookupTable '"$writeLookupTable"'
96 + git config pack.writeBitmapLookupTable '"$writeLookupTable"' &&
97 + git config maintenance.auto false
98 '
99
100 midx_bitmap_core
t/t5327-multi-pack-bitmaps-rev.sh
+2 -1
@@ -30,7 +30,8 @@ test_midx_bitmap_rev () {
30 test_expect_success 'setup bitmap config' '
31 rm -rf * .git &&
32 git init &&
33 - git config pack.writeBitmapLookupTable '"$writeLookupTable"'
33 + git config pack.writeBitmapLookupTable '"$writeLookupTable"' &&
34 + git config maintenance.auto false
35 '
36
37 midx_bitmap_core rev
t/t5331-pack-objects-stdin.sh
+2
@@ -14,6 +14,7 @@ packed_objects () {
14
15 test_expect_success 'setup for --stdin-packs tests' '
16 git init stdin-packs &&
17 + git -C stdin-packs config set maintenance.auto false &&
18 (
19 cd stdin-packs &&
20
@@ -255,6 +256,7 @@ test_expect_success '--stdin-packs=follow walks into unknown packs' '
256 git init repo &&
257 (
258 cd repo &&
259 + git config set maintenance.auto false &&
260
261 for c in A B C D
262 do
t/t5332-multi-pack-reuse.sh
+1
@@ -59,6 +59,7 @@ test_pack_objects_reused () {
59
60 test_expect_success 'preferred pack is reused for single-pack reuse' '
61 test_config pack.allowPackReuse single &&
62 + git config set maintenance.auto false &&
63
64 for i in A B
65 do
t/t5334-incremental-multi-pack-index.sh
+1
@@ -15,6 +15,7 @@ midx_chain=$midxdir/multi-pack-index-chain
15
16 test_expect_success 'convert non-incremental MIDX to incremental' '
17 test_commit base &&
18 + git config set maintenance.auto false &&
19 git repack -ad &&
20 git multi-pack-index write &&
21
t/t5500-fetch-pack.sh
+2 -1
@@ -154,7 +154,8 @@ test_expect_success 'clone shallow depth 1 with fsck' '
154 '
155
156 test_expect_success 'clone shallow' '
157 - git clone --no-single-branch --depth 2 "file://$(pwd)/." shallow
157 + git clone --no-single-branch --depth 2 "file://$(pwd)/." shallow &&
158 + git -C shallow config set maintenance.auto false
159 '
160
161 test_expect_success 'clone shallow depth count' '
t/t5616-partial-clone.sh
+1
@@ -585,6 +585,7 @@ test_expect_success 'verify fetch downloads only one pack when updating refs' '
585 git clone --filter=blob:none "file://$(pwd)/srv.bare" pack-test &&
586 ls pack-test/.git/objects/pack/*pack >pack-list &&
587 test_line_count = 2 pack-list &&
588 + test_config -C pack-test maintenance.auto false &&
589 for i in A B C
590 do
591 test_commit -C src $i &&
t/t7700-repack.sh
+3
@@ -217,6 +217,7 @@ test_expect_success 'repack --keep-pack' '
217 cd keep-pack &&
218 # avoid producing different packs due to delta/base choices
219 git config pack.window 0 &&
220 + git config maintenance.auto false &&
221 P1=$(commit_and_pack 1) &&
222 P2=$(commit_and_pack 2) &&
223 P3=$(commit_and_pack 3) &&
@@ -260,6 +261,7 @@ test_expect_success 'repacking fails when missing .pack actually means missing o
261
262 # Avoid producing different packs due to delta/base choices
263 git config pack.window 0 &&
264 + git config maintenance.auto false &&
265 P1=$(commit_and_pack 1) &&
266 P2=$(commit_and_pack 2) &&
267 P3=$(commit_and_pack 3) &&
@@ -534,6 +536,7 @@ test_expect_success 'setup for --write-midx tests' '
536 (
537 cd midx &&
538 git config core.multiPackIndex true &&
539 + git config maintenance.auto false &&
540
541 test_commit base
542 )