git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] t5310-pack-bitmaps: make JGit tests work with GIT_TEST_SPLIT_INDEX
Date: Thu, 10 May 2018 10:34:33 -0400	[thread overview]
Message-ID: <20180510143432.GC25617@sigill.intra.peff.net> (raw)
In-Reply-To: <20180510135852.25232-1-szeder.dev@gmail.com>

On Thu, May 10, 2018 at 03:58:52PM +0200, SZEDER Gábor wrote:

> 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

  reply	other threads:[~2018-05-10 14:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 13:58 [PATCH] t5310-pack-bitmaps: make JGit tests work with GIT_TEST_SPLIT_INDEX SZEDER Gábor
2018-05-10 14:34 ` Jeff King [this message]
2018-05-10 14:55   ` SZEDER Gábor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180510143432.GC25617@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).