Description
Hey @Byron,
I met with @xla and @kim to discuss gitoxide
and our needs in radicle-link
.
We landed in a high-level priority list as follows:
- Remote capabilities would be our highest priority, being able to fetch changes from a peer
in our case and the peer responding with the changeset. - The Ref DB would be our next highest priority.
- Followed by local capabilities, we're happy to use libgit2 here during a transitionary period.
Remote capabilities
Looking through the checklist from the README, we saw that one part of the fetching story is
complete but we would need pack-send
which is unchecked. As I mentioned above, the fetch exchange
would be top of our list. Maybe you could flesh out what's complete here, what's missing, and where
we could start looking in the code-base to understand this better.
To elaborate on our needs in this area, we need to implement our own transport
layer, so we'd be interested in what the gitoxide
API looks like here.
Reference DB
We will have a lot of refs, which we constantly read and update. Eventually, we will want a
"real" database, but if we keep using libgit2, we would have to teach it to use a custom backend. As
a middleground, if gitoxide supports "packed refs" (that's a single file containing all the refs),
this would already be an improvement (that's assuming libgit2 loads the refs lazily).
Local Needs
Reference Handling
For reference handling, we need to be able to read references, perform commits, and compute merge
basing. This functionality is necessary for our handling of documents on the network.
Git Config
We use the git config in a couple of places currently. One way is to track remotes and the other is
for configuring working-copies for fetching changes. Since we can rely on libgit here, it's lower
priority.
Notes and Questions
The V2 implementation
Because in v2, the server doesn't send all the refs unsolicited, but the client requests them
explicitly, and can filter by prefix. It is also, afaiu, that the "ref-in-want" feature would allow
us to request refs across namespaces, without jumping through hoops to make the server ref
advertisement match what we are likely going to fetch (we can compute all refs we want to fetch up
front).
Somewhat relatedly, libgit2 currently insists to only update (a subset of) the refs the server
advertised, at the exact oids the server advertised -- what we would want is a bit more control over
this:
Say we have refs/remotes/XYZ/rad/foo
, for which the remote peer advertises that its tip is
abcde
. We know, however, that XYZ signed a tip xyz09
which is an ancestor of abcde
. We'd like
to ask the remote end for xyz09
, and if that object is in the packfile, we'd update
refs/remotes/XYZ/rad/foo
locally to this. Currently, if the remote end is ahead, we would not
update the ref at all.
Questions
- We saw a check box for "Write all data types" and we were wondering what this meant?
- The checklist is useful to understand at a high level what you've completed but I think we'd like
to get a better understanding of what's more complete, what's still in progress, and what hasn't
been started.
We're excited about the prospect of using gitoxide
and being able to contribute to it, however,
we've only got so much person-power at the moment. So this is a good first step in figuring out how
much work is involved. After that, we can work out how much time we delegate to helping out on the
project.