Skip to content

Commit 90ca149

Browse files
peffgitster
authored andcommitted
t5310: correctly remove bitmaps for jgit test
We use "jgit gc" to generate a pack bitmap file, and then make sure our implementation can read it. To prepare the repo before running jgit, we try to "rm -f" any existing bitmap files. But we got the path wrong; we're in a bare repo, so looking in ".git/" finds nothing. Our "rm" doesn't complain because of the "-f", and when we run "rev-list" there are two bitmap files (ours and jgit's). Our reader implementation will ignore one of the bitmap files, but it's likely non-deterministic which one we will use. We'd prefer the one with the more recent timestamp (just because of the way the packed_git list is sorted), but in most test runs they'd have identical timestamps. So this was probably actually testing something useful about 50% of the time, and other half just testing that we could read our own bitmaps (which is covered elsewhere). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 36eba03 commit 90ca149

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t5310-pack-bitmaps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ test_expect_success JGIT 'we can read jgit bitmaps' '
269269
git clone --bare . compat-jgit.git &&
270270
(
271271
cd compat-jgit.git &&
272-
rm -f .git/objects/pack/*.bitmap &&
272+
rm -f objects/pack/*.bitmap &&
273273
jgit gc &&
274274
git rev-list --test-bitmap HEAD
275275
)

0 commit comments

Comments
 (0)