gitoxide icon indicating copy to clipboard operation
gitoxide copied to clipboard

`gix-ref`: ref-table backend (research)

Open Byron opened this issue 4 years ago • 9 comments

It's not in mainline yet, but definitely kind of on the way and available.

I thought I saw it show up once in the mainline git repository, but it's definitely not there anymore.

Byron avatar Jun 25 '21 03:06 Byron

FYI this is now merged into v2.45.0 https://gitlab.com/git-vcs/git/-/blob/v2.45.1/Documentation/RelNotes/2.45.0.txt?ref_type=tags#L8

KarthikNayak avatar May 24 '24 21:05 KarthikNayak

This would be quite nice if supported. Just out of curiosity I used --ref-format=reftable when cloning some repos, but my starship prompt cannot show most information about the repo (for example which branch I am on).

kamulos avatar May 24 '24 22:05 kamulos

Thanks for the heads-up! It will definitely take a while until this becomes priority, as it will only really be needed when gitoxide gets to the server side.

Byron avatar May 25 '24 05:05 Byron

Thanks for the heads-up! It will definitely take a while until this becomes priority, as it will only really be needed when gitoxide gets to the server side.

Reftables can be used on the client side too. Like @kamulos mentioned, clients like starship would already break.

KarthikNayak avatar May 25 '24 06:05 KarthikNayak

I am quite aware - however, those most interested would be servers, or users with huge monorepos. The latter are probably missing more features than just ref-table at the moment, so it will take a while. Ordinary use-cases don't have benefits switching to ref-table, as it makes the ref-database more obscure.

Byron avatar May 25 '24 19:05 Byron

Yup, that I agree with. There is also talks about making it default a lot later, something to keep an eye out for https://lore.kernel.org/git/84c01f1b0a2d24d7de912606f548623601c0d715.1716555034.git.ps@pks.im/

KarthikNayak avatar May 25 '24 19:05 KarthikNayak

Thanks! Please keep me posted about this. I definitely hope they won't make it default anytime soon, that would force my hand 😅. Thinking about it - the ton of Git libraries out there would all have to struggle to get that implemented, so my feeling is they will just keep what's working well by now.

Byron avatar May 25 '24 19:05 Byron

BTW, you may know that Patrick Steinhardt is dabbling in rewriting reftable into Rust. That might be reusable for gitoxide too, not sure.

nasamuffin avatar Feb 14 '25 19:02 nasamuffin

That's great to hear, thank for sharing! I am pretty sure it will be reusable and am looking forward to integrating with it.

Byron avatar Feb 15 '25 07:02 Byron

Thanks! Please keep me posted about this. I definitely hope they won't make it default anytime soon, that would force my hand 😅. Thinking about it - the ton of Git libraries out there would all have to struggle to get that implemented, so my feeling is they will just keep what's working well by now.

Just passing by with FYI: The [ANNOUNCE] Git v2.51.0 mentions:

 * The reftable ref backend has matured enough; Git 3.0 will make it
   the default format in a newly created repositories by default.

Binlogo avatar Nov 05 '25 04:11 Binlogo

Thanks! In other news: I am in close contact with Patrick Steinhardt, the original author of the C version of RefTables. He has now found 2 great folks who want to take on the Rust port. That port will happen in the Git codebase itself, and should have a usable MIT-licensed crate as a result.

That then should be something gitoxide can consume and bring it into its own API. I will be in touch with everyone as it happens, and maybe we figure out together how that Rust port can be suitable for everyone.

In any case: great excitement :).

Byron avatar Nov 05 '25 05:11 Byron