This post is in response to a comment someone made on irc earlier today:
[I] would really like a git lookaside cache which operated on an upstream repo, but pulled objects locally when they’re available
In this post I present a proof-of-concept solution to this request. Please note that thisand isn’t something that has actually been used or tested anywhere!
If you access a git repository via ssh, it’s easy to provide a
wrapper for git operations via the command= option in an
authorized_keys file. We can take advantage of this to update a a
local “cache” repository prior to responding to a clone/pull/etc.
operation.