git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Han-Wen Nienhuys <hanwenn@gmail.com>
Cc: git <git@vger.kernel.org>, Josh Steadmon <steadmon@google.com>
Subject: Re: reftable & jgit compatibility
Date: Thu, 4 Apr 2024 08:23:25 +0200	[thread overview]
Message-ID: <Zg5HXZrL_4BsyzfG@tanuki> (raw)
In-Reply-To: <CAOw_e7Y_MwgrrJzuHk7tzBR9a2kDfTnwCzC-7_rgj8UJPKqp9g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2427 bytes --]

On Wed, Apr 03, 2024 at 05:57:19PM +0200, Han-Wen Nienhuys wrote:
> On Wed, Apr 3, 2024 at 4:41 PM Patrick Steinhardt <ps@pks.im> wrote:
> >
> > On Wed, Apr 03, 2024 at 12:36:04PM +0200, Han-Wen Nienhuys wrote:
> > > Thanks again for taking up this work.
> > >
> > > As I'm browsing over your patches (and realizing how much of the
> > > arcana of the format I've forgotten), I hope that I did not make any
> > > errors in implementing the spec (and/or that Shawn didn't deviate his
> > > implementation from the spec). It would be extremely unfortunate if an
> > > incompatibility between CGit and JGit were discovered after it is
> > > released.
> > >
> > > So far I have always been able to read JGit reftables using the C / Go
> > > code, but it would be good to systematically test this, ie. generate a
> > >  bunch of tables using JGit and check that passing them through the C
> > > code (read & write) leaves them unchanged. Or perhaps check in some
> > > tables as golden reference data.
> > >
> > > Josh can probably connect you to the right folks to help with this on
> > > the JGit side.
> >
> > I very much agree, this thought has crossed my mind multiple times while
> > working on the whole reftable saga. Ideally, we would have integration
> > tests that write reftables with one of the implementations and then read
> > them with the respective other implementation. I wouldn't really know
> > where to put those though. CGit is very unlikely to pull in JGit as a
> > test dependency. Does JGit have any tests that already use CGit?
> 
> Yes, but not many (eg. CGitIgnoreTest.java).
> 
> I think the easiest way to make this happen is if CGit would ship a
> command to dump a raw reftable in a release soonish. Then JGit could
> use that command to cross-check that a JGit-written reftable can be
> read correctly by the CGit code.  By shipping just the dumper you
> avoid having to wait for proper reftable support to land in git.

You do realize that "proper reftable support" has already landed, right?
So you can just use Git to create a reftable-enabled repository, write
commits and then use JGit to access the whole repository instead of only
checking a single table.

Might be I'm missing your point though, not sure.

Patrick

> Probably the dumper should be extended to also support seeks, so you
> can also exercise the indexing/searching code.



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-04-04  6:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 10:36 reftable & jgit compatibility Han-Wen Nienhuys
2024-04-03 10:47 ` Patrick Steinhardt
2024-04-03 15:57   ` Han-Wen Nienhuys
2024-04-04  6:23     ` Patrick Steinhardt [this message]
2024-04-04  6:44       ` Han-Wen Nienhuys
2024-04-04  7:20         ` Patrick Steinhardt
2024-04-04  8:36           ` Han-Wen Nienhuys
2024-04-03 20:54   ` Jeff King
2024-04-04  6:29     ` Patrick Steinhardt
2024-04-03 15:51 ` Luca Milanesio
2024-04-03 16:42   ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=Zg5HXZrL_4BsyzfG@tanuki \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=hanwenn@gmail.com \
    --cc=steadmon@google.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).