git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t5310-pack-bitmaps: make JGit tests work with GIT_TEST_SPLIT_INDEX

From
Jeff King <peff@peff.net>
Date
May 10, 2018, 14:34 UTC
Message-ID
<20180510143432.GC25617@sigill.intra.peff.net>
In-Reply-To
<20180510135852.25232-1-szeder.dev@gmail.com>
On Thu, May 10, 2018 at 03:58:52PM +0200, SZEDER Gábor wrote:
Show 17 quoted lines
> 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.
Nice, this seems like a clever workaround.
Reviewed-by: Jeff King <peff@peff.net>

The more heavy-handed approach would be to just disable the JGIT prereq when GIT_TEST_SPLIT_INDEX is in use, which would cover this and potentially any other cases. This is nicer because it lets us continue using the test. And it's not like we have a ton of jgit dependencies, such that dealing with each individually would be a burden.

-Peff
Previous: SZEDER GáborNext: SZEDER Gábor
Message 2 of 3 in “t5310-pack-bitmaps: make JGit tests work with GIT_TEST_SPLIT_INDEX”
  1. t5310-pack-bitmaps: make JGit tests work with GIT_TEST_SPLIT_INDEXSZEDER Gábor, May 10, 2018
  2. Jeff KingMay 10, 2018
  3. SZEDER GáborMay 10, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.