-
Hi! I'm writing a toy HTTP-based Git remote, and using gitoxide here and there for some plumbing I was just wondering if it is possible to create a packfile (suitable for using in a response to a fetch command when cloning) from a list of objects, each just having its object ID and the raw object data (i.e. something like I've read around in I've also looked at #692 and read through this create function, but so much of the code seems to rely on a handle to an actual repository. Is there an easy way to do this when I simply have the raw object data and the IDs? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Pack creation is indeed possible and abstracted enough to be able to create packs entirely from memory. To get started, I recommend playing with But you already know that.
The I hope that helps. |
Beta Was this translation helpful? Give feedback.
Pack creation is indeed possible and abstracted enough to be able to create packs entirely from memory.
To get started, I recommend playing with
gix no-repo pack
, and the implementation can be found here for prototyping.But you already know that.
The
handle
in this portion of the codebase refers to something that implements thegix_pack::Find
trait. You should be able to implement portions of it to provide data to the machinery. Note that it's tuned to assume packs, …