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

Re: reftable & jgit compatibility

From
Patrick Steinhardt <ps@pks.im>
Date
Apr 3, 2024, 10:47 UTC
Message-ID
<Zg0zs2_QLpXv2PwT@tanuki>
In-Reply-To
<CAOw_e7Z_10b73n91ihsaao_S-XPkNqvY7gTcHvqUODKD-SwPSA@mail.gmail.com>
On Wed, Apr 03, 2024 at 12:36:04PM +0200, Han-Wen Nienhuys wrote:
Show 17 quoted lines
> 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?

Adding a bunch of reftables pre-generated by JGit might be an okayish tradeoff, I guess. I also don't really expect the format to evolve significantly, so these should be reasonably static over the long term.

Patrick
Previous: Han-Wen NienhuysNext: Han-Wen Nienhuys
Message 2 of 11 in “reftable & jgit compatibility”
  1. Han-Wen NienhuysApr 3, 2024
  2. Patrick SteinhardtApr 3, 2024
  3. Han-Wen NienhuysApr 3, 2024
  4. Patrick SteinhardtApr 4, 2024
  5. Han-Wen NienhuysApr 4, 2024
  6. Patrick SteinhardtApr 4, 2024
  7. Han-Wen NienhuysApr 4, 2024
  8. Jeff KingApr 3, 2024
  9. Patrick SteinhardtApr 4, 2024
  10. Luca MilanesioApr 3, 2024
  11. Junio C HamanoApr 3, 2024

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.