t5310-pack-bitmaps: make JGit tests work with GIT_TEST_SPLIT_INDEX

The two JGit tests 'we can read jgit bitmaps' and 'jgit can read our bitmaps' in 't5310-pack-bitmaps.sh' fail when run with GIT_TEST_SPLIT_INDEX=YesPlease. Both tests create a clone of the test repository to check bitmap interoperability with JGit. With split indexes enabled the index in the clone repositories contains the 'link' extension, which JGit doesn't support and, consequently, an exception aborts it: <...> org.eclipse.jgit.api.errors.JGitInternalException: DIRC extension 'link' not supported by this version. at org.eclipse.jgit.dircache.DirCache.readFrom(DirCache.java:562) <...> Since testing bitmaps doesn't need a worktree in the first place, let's just create bare clones for the two JGit tests, so the cloned won't have an index, and these two tests can be executed even with split index enabled. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

SZEDER Gábor committed May 10, 2018 at 15:58 UTC 87a6bb701a04d4543314f6f7172f2f95fa298d29
1 file changed +4 -4
t/t5310-pack-bitmaps.sh
+4 -4
@@ -264,9 +264,9 @@ test_expect_success 'pack with missing parent' '
264 '
265
266 test_expect_success JGIT 'we can read jgit bitmaps' '
267 - git clone . compat-jgit &&
267 + git clone --bare . compat-jgit.git &&
268 (
269 - cd compat-jgit &&
269 + cd compat-jgit.git &&
270 rm -f .git/objects/pack/*.bitmap &&
271 jgit gc &&
272 git rev-list --test-bitmap HEAD
@@ -274,9 +274,9 @@ test_expect_success JGIT 'we can read jgit bitmaps' '
274 '
275
276 test_expect_success JGIT 'jgit can read our bitmaps' '
277 - git clone . compat-us &&
277 + git clone --bare . compat-us.git &&
278 (
279 - cd compat-us &&
279 + cd compat-us.git &&
280 git repack -adb &&
281 # jgit gc will barf if it does not like our bitmaps
282 jgit gc