Right now, a repository may have multiple backends for reading and writing Git objects.
I propose extending the scope of custom backends to include reading and writing of references and configuration data. This way it'd be possible to work with repositories that have no local disk presence, such as a repository kept entirely in S3. At the moment this is not possible without some hacks and a throw-away local repository (where refs are written before reflecting them in S3, for example).
Partial duplicate of #221
I strongly support this proposal :
This is already supported by the config layer. The only missing part is allowing multiple backends for refs, which we keep talking about but never actually sit down to implement.
I spiked this a while back. Let me see how bad it will be to get it cleaned up against a current code base.
If anybody else is interested in this I can just push up what I had and y'all can figure out what to do with it.
@ethomson I would like to take a look at what you had, if you can put it up on a branch for me.
Edited what I had to be against a current code base.
@jwiegley check out #1240
This needs tests, at the very least.
Note that this doesn't support multiple backends, just a single backend. One could have multiple backends with priority, but you could also simply do that with your own multiplexing backend. I dunno.
I don't know if there's really a sane way to separate loose and packed into their own backends and then figure out how to invoke them such that the semantics still work. I sort of doubt that this could be done without gnashing of teeth. There be monsters.
@ethomson Sorry, for whatever reason GitHub never notified me that you mentioned me. Is your patch still relevant to the current codebase? What's left to do to complete it? Right now I'm hacking around this for my S3 backend by using beforeRead and afterWrite hooks.
@jwiegley - I re-rebased this to pull in the recent refs changes that went in. I think the only thing that's needed is some proper unit tests and some docs on the .h files.
Excellent I'll take a look.
Can this be closed now or is there some aspect you can't virtualize yet?
You can close now. I'll open further issues if there is specific support still needed.