ggit
ggit copied to clipboard
Expose unpack-objects / pack-objects
Is there any plan to expose unpack-objects / pack-objects functionality (i.e. pack.go) on the public API? My use case is that I don't have access to a file system so I need to unpack objects in memory (or on a proprietary storage engine such S3).
Just wanted to acknowledge that I saw the suggestion and yeah, definitely seems like a good idea. Thanks!
@themihai This project is unmaintained, experimental, and not recommended for any kind of production use. That being said, the current code allows you to read pack data from any bufio.Reader
https://github.com/jbrukh/ggit/blob/master/api/parse/pack.go#L284-L291
which means you can implement a reader backed by memory, S3, etc.
@jbrukh think the issue might be:
type Opener func() (*os.File, error)
Ah, right on. If you're not using any kind of os.File
specific functionality, might as well make that an io.Reader
. From what I recall from 30 years ago when we made this, the api.Repository
interface is abstract in order to be able to support different kinds of repository backends, but the ggit
command certainly assumes a DiskRepository
at the moment.
I thought the same. An io.ReadWriterCloser at most should suffice unless I'm missing something. NewPackIdxParser
also seems to require an idx file rather than pack file.
Hi. Not to shoot our here lonely project in the face, but the following just showed up on Hacker News:
https://github.com/src-d/go-git
Very cool -- it was just a matter of time. :)
On Tue, Feb 16, 2016 at 11:58 AM, Michael Bosworth <[email protected]
wrote:
Hi. Not to shoot our here lonely project in the face, but the following just showed up on Hacker News:
https://github.com/src-d/go-git
— Reply to this email directly or view it on GitHub https://github.com/jbrukh/ggit/issues/51#issuecomment-184769879.