Replies: 3 comments 10 replies
-
It's great to see your feedback as apparently you have spent quite some time looking through the crates provided here. As I don't think I fully understood the first two paragraphs, let me skip ahead a little. From there it might be possible to fill in the blanks in the conversation that might follow from that.
Pack headers and loose object headers are indeed different, but the hash must be computed based on the loose object header.
Doing this kind of work would make an eventual move to WASM much easier though, so I am definitely open to seeing work done in that direction.
It's true, there is no server side yet. |
Beta Was this translation helpful? Give feedback.
-
It's close, but here is where it differs:
With that revelation and all the information added here, there might be a more suitable headline for this discussion in case you consider a change. Skipping right ahead to the problem at hand.
Even though In the interest of an MVP, I'd create a RAM-disk for all git operations, and use git-fetch or gitoxide-fetch to write a bare repository. From there, I highly recommend to go with something like that instead. |
Beta Was this translation helpful? Give feedback.
-
All my remarks thus far refer to the server side, but I was under the assumption that it would at some point fetch/clone repositories from GitHub to act as a proxy with actual data. That data, in the form of git repositories, should be in memory, is what I understand. If that's at all the case, cloning to a disk and letting the OS handle memory mapping/caching is probably the easiest and most scalable solution, but ultimately it doesn't matter as long as there is a real filesystem. Again, I don't recommend to try generalizing |
Beta Was this translation helpful? Give feedback.
-
I'm building a mock / fake which has to operate on (and present) git repositories. While it has basically no support anywhere I figured in-memory git would still be a good idea (as I don't really need resilience or much concurrent access or anything).
Though like the rest the gitoxide project doesn't have in-memory support the various sub-crates seem like really cool building blocks with some affordances, however in reading the documentation of the various sub-crates which look to be of interest it looks like the very low level use-case seems to be... not unsupported but not very coherent at this point? But I don't really know if it's by design / convenience or just a matter of having other stuff to deal with and that not being important.
Specifically: the story about parsing and serialisation of objects seems a bit all over the place, with
git_object
I was expecting the possibility of relatively easily parsing from "store blobs" but it looks like the crate only parses to and serializes from the objects themselves, and the "store headers" are ingit_pack::loose::object::header
, and the individual stores implement the hashing of the result "by hand" (generally usinggit_features::hash::Write
so they can straight write the "store blob" to a zlib compressor), that correct?Wouldn't it make sense for the header parsing and serialisation to be in
git_object
instead, such that you could parse / serialize without concerns ofKind
and get a "store-suitable" representation (modulo possible compression)?Also would
git_odb
be "interested" in an in-memory store of git objects, and possibly a version ofCompound
(or maybeLinked
) which can delegate to arbitrary store implementations? (not sureFind
is object-safe, though I figure there only needs to be one store which isWrite
and would logically be the "head of line" when looking up an object).And finally, I've looked around whether there was any support for the server-side part of the git network protocol(s), and so far that doesn't seem to be the case right?
git-protocol
andgit-transport
seem to mostly / only implement the client side of the communication at this point unless I missed something?Beta Was this translation helpful? Give feedback.
All reactions