Skip to content

Commit 4b58b6f

Browse files
ttaylorrgitster
authored andcommitted
t7700: update to work with MIDX bitmap test knob
A number of these tests are focused only on pack-based bitmaps and need to be updated to disable 'GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP' where necessary. Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e255a5e commit 4b58b6f

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

t/t7700-repack.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ test_expect_success 'objects in packs marked .keep are not repacked' '
6363

6464
test_expect_success 'writing bitmaps via command-line can duplicate .keep objects' '
6565
# build on $oid, $packid, and .keep state from previous
66-
git repack -Adbl &&
66+
GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0 git repack -Adbl &&
6767
test_has_duplicate_object true
6868
'
6969

7070
test_expect_success 'writing bitmaps via config can duplicate .keep objects' '
7171
# build on $oid, $packid, and .keep state from previous
72-
git -c repack.writebitmaps=true repack -Adl &&
72+
GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0 \
73+
git -c repack.writebitmaps=true repack -Adl &&
7374
test_has_duplicate_object true
7475
'
7576

@@ -189,7 +190,9 @@ test_expect_success 'repack --keep-pack' '
189190

190191
test_expect_success 'bitmaps are created by default in bare repos' '
191192
git clone --bare .git bare.git &&
192-
git -C bare.git repack -ad &&
193+
rm -f bare.git/objects/pack/*.bitmap &&
194+
GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0 \
195+
git -C bare.git repack -ad &&
193196
bitmap=$(ls bare.git/objects/pack/*.bitmap) &&
194197
test_path_is_file "$bitmap"
195198
'
@@ -200,7 +203,8 @@ test_expect_success 'incremental repack does not complain' '
200203
'
201204

202205
test_expect_success 'bitmaps can be disabled on bare repos' '
203-
git -c repack.writeBitmaps=false -C bare.git repack -ad &&
206+
GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0 \
207+
git -c repack.writeBitmaps=false -C bare.git repack -ad &&
204208
bitmap=$(ls bare.git/objects/pack/*.bitmap || :) &&
205209
test -z "$bitmap"
206210
'
@@ -211,7 +215,8 @@ test_expect_success 'no bitmaps created if .keep files present' '
211215
keep=${pack%.pack}.keep &&
212216
test_when_finished "rm -f \"\$keep\"" &&
213217
>"$keep" &&
214-
git -C bare.git repack -ad 2>stderr &&
218+
GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0 \
219+
git -C bare.git repack -ad 2>stderr &&
215220
test_must_be_empty stderr &&
216221
find bare.git/objects/pack/ -type f -name "*.bitmap" >actual &&
217222
test_must_be_empty actual
@@ -222,7 +227,8 @@ test_expect_success 'auto-bitmaps do not complain if unavailable' '
222227
blob=$(test-tool genrandom big $((1024*1024)) |
223228
git -C bare.git hash-object -w --stdin) &&
224229
git -C bare.git update-ref refs/tags/big $blob &&
225-
git -C bare.git repack -ad 2>stderr &&
230+
GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0 \
231+
git -C bare.git repack -ad 2>stderr &&
226232
test_must_be_empty stderr &&
227233
find bare.git/objects/pack -type f -name "*.bitmap" >actual &&
228234
test_must_be_empty actual

0 commit comments

Comments
 (0)