]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t: disable maintenance where we verify object database structure
authorPatrick Steinhardt <ps@pks.im>
Tue, 24 Feb 2026 08:45:46 +0000 (09:45 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Feb 2026 15:33:19 +0000 (07:33 -0800)
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>
t/t0081-find-pack.sh
t/t5316-pack-delta-depth.sh
t/t5319-multi-pack-index.sh
t/t5326-multi-pack-bitmaps.sh
t/t5327-multi-pack-bitmaps-rev.sh
t/t5331-pack-objects-stdin.sh
t/t5332-multi-pack-reuse.sh
t/t5334-incremental-multi-pack-index.sh
t/t5500-fetch-pack.sh
t/t5616-partial-clone.sh
t/t7700-repack.sh

index 5a628bf7356445384ff97f5e55a8d233379bdecb..26f017422d7253c52e2148ed9eaf8f2f1d6b9717 100755 (executable)
@@ -68,6 +68,7 @@ test_expect_success 'add more packfiles' '
 '
 
 test_expect_success 'add more commits (as loose objects)' '
+       test_config maintenance.auto false &&
        test_commit six &&
        test_commit seven &&
 
index 03dfb7a61ea978dc7358ba1a8c703b860a23fdf6..8a067a45cb4baebc4f70d197242878fe036202d3 100755 (executable)
@@ -48,6 +48,7 @@ test_description='pack-objects breaks long cross-pack delta chains'
 # repeatedly-modified file to generate the delta chain).
 
 test_expect_success 'create series of packs' '
+       test_config maintenance.auto false &&
        test-tool genrandom foo 4096 >content &&
        prev= &&
        for i in $(test_seq 1 10)
index faae98c7e76a204d281397282ae75a97bc441c31..7672d599d4e470bd0e6808da635ea04ef126d578 100755 (executable)
@@ -1315,6 +1315,7 @@ test_expect_success 'bitmapped packs are stored via the BTMP chunk' '
        git init repo &&
        (
                cd repo &&
+               git config set maintenance.auto false &&
 
                for i in 1 2 3 4 5
                do
index 892aeb09e4b9d710acc625b27ab8eb277b0b690f..62bd973d92afc9393abbb3440caedf38468dfea8 100755 (executable)
@@ -93,7 +93,8 @@ test_midx_bitmap_cases () {
        test_expect_success 'setup test_repository' '
                rm -rf * .git &&
                git init &&
-               git config pack.writeBitmapLookupTable '"$writeLookupTable"'
+               git config pack.writeBitmapLookupTable '"$writeLookupTable"' &&
+               git config maintenance.auto false
        '
 
        midx_bitmap_core
index 9cac03a94bf4b4014d0ecd9fd7fc6320949b3e9f..cfa12de2a8a7baad7f4bf1623b2f948f23b53672 100755 (executable)
@@ -30,7 +30,8 @@ test_midx_bitmap_rev () {
        test_expect_success 'setup bitmap config' '
                rm -rf * .git &&
                git init &&
-               git config pack.writeBitmapLookupTable '"$writeLookupTable"'
+               git config pack.writeBitmapLookupTable '"$writeLookupTable"' &&
+               git config maintenance.auto false
        '
 
        midx_bitmap_core rev
index cd949025b982a446d54830cdd8efec5655c8946d..b03f6be1644471b82a945f09210222be0e31d853 100755 (executable)
@@ -14,6 +14,7 @@ packed_objects () {
 
 test_expect_success 'setup for --stdin-packs tests' '
        git init stdin-packs &&
+       git -C stdin-packs config set maintenance.auto false &&
        (
                cd stdin-packs &&
 
@@ -255,6 +256,7 @@ test_expect_success '--stdin-packs=follow walks into unknown packs' '
        git init repo &&
        (
                cd repo &&
+               git config set maintenance.auto false &&
 
                for c in A B C D
                do
index 395d09444ced72d219ba5f19ae7e3b729aef5590..881ce668e1d14e17be043d208580fa35f1e1f1e0 100755 (executable)
@@ -59,6 +59,7 @@ test_pack_objects_reused () {
 
 test_expect_success 'preferred pack is reused for single-pack reuse' '
        test_config pack.allowPackReuse single &&
+       git config set maintenance.auto false &&
 
        for i in A B
        do
index d30d7253d6f6ccff503775c2961a4cc983197530..99c7d44d8e9d342c077fab13e5bee2f98a473190 100755 (executable)
@@ -15,6 +15,7 @@ midx_chain=$midxdir/multi-pack-index-chain
 
 test_expect_success 'convert non-incremental MIDX to incremental' '
        test_commit base &&
+       git config set maintenance.auto false &&
        git repack -ad &&
        git multi-pack-index write &&
 
index 4bb56c167a52ecf7a25f48af7b3543e189339f12..0c88d04d0ad727337fd3acd0541663f0df9ec7ac 100755 (executable)
@@ -154,7 +154,8 @@ test_expect_success 'clone shallow depth 1 with fsck' '
 '
 
 test_expect_success 'clone shallow' '
-       git clone --no-single-branch --depth 2 "file://$(pwd)/." shallow
+       git clone --no-single-branch --depth 2 "file://$(pwd)/." shallow &&
+       git -C shallow config set maintenance.auto false
 '
 
 test_expect_success 'clone shallow depth count' '
index d62760eb92b42228c2311fe7fdc868cc9e174286..1c2805accac63691d0e18919e71cf29037b9cb0c 100755 (executable)
@@ -585,6 +585,7 @@ test_expect_success 'verify fetch downloads only one pack when updating refs' '
        git clone --filter=blob:none "file://$(pwd)/srv.bare" pack-test &&
        ls pack-test/.git/objects/pack/*pack >pack-list &&
        test_line_count = 2 pack-list &&
+       test_config -C pack-test maintenance.auto false &&
        for i in A B C
        do
                test_commit -C src $i &&
index 73b78bdd887d80706e2f65dc9c3c25cb81027c71..acc2589f2127275f3fa7993cbceff84419fb36c2 100755 (executable)
@@ -217,6 +217,7 @@ test_expect_success 'repack --keep-pack' '
                cd keep-pack &&
                # avoid producing different packs due to delta/base choices
                git config pack.window 0 &&
+               git config maintenance.auto false &&
                P1=$(commit_and_pack 1) &&
                P2=$(commit_and_pack 2) &&
                P3=$(commit_and_pack 3) &&
@@ -260,6 +261,7 @@ test_expect_success 'repacking fails when missing .pack actually means missing o
 
                # Avoid producing different packs due to delta/base choices
                git config pack.window 0 &&
+               git config maintenance.auto false &&
                P1=$(commit_and_pack 1) &&
                P2=$(commit_and_pack 2) &&
                P3=$(commit_and_pack 3) &&
@@ -534,6 +536,7 @@ test_expect_success 'setup for --write-midx tests' '
        (
                cd midx &&
                git config core.multiPackIndex true &&
+               git config maintenance.auto false &&
 
                test_commit base
        )