[PATCH 0/5] Some very preliminary remote git access patches
Linus Torvalds
torvalds at linux-foundation.org
Sun Feb 8 19:13:17 PST 2015
So this isn't actually where I wanted to be, but I had a few false starts
with this, and spent too much time trying to figure out the oddities of
libgit2 before I just took a different approach.
I originally wanted to create a local cache of a remote git repository -
multiple branches and all. But the remote tracking branch behavior of
libgit2 was too confusing, and I eventually realized that I also want to
have a branch actually checked out in that local repository, so I ended up
modifying the "local cache" model so that each *branch* has its own local
cache.
That's probably the sane thing to do anyway, it just happens to not be
what we tend to do with Dirk when we share our dives all in one git repo.
But this is just the local cache anyway, so it should be hidden from any
normal user input.
I even tried to make it put things in a sane place by using the
QStandardPaths::standardLocations interface, but since I only run Linux, I
have no idea how well that works anywhere else. For me, it means that the
private caches end up being held in your home directory in
~/.local/share/Subsurface/Subsurface/git-caches/
but from a user perspective that should not be something anybody really
cares about.
The five patches make it possible to basically point to a remote git
repository using something simple like
subsurface git://remotehost/repo[branch]
but sadly, I never got around to actually figuring out why libgit2 doesn't
use the SSH config file, and how the authentication is supposed to work.
So in practice, it's not actually useful for any private git repositories
on the network, and I've been just faking it by using
subsurface file:///home/torvalds/scuba-mirror[linus]
instead.
And even then, not everything is done.
So why even send it out? Because of the five patches, the four first ones
are just preliminary helper setup, and the fifth one is likely the base
for whatever future real work. I think I got the design right, I just
haven't fought libgit2 to do authentication or indeed any progress
information.
Aside from the fact that there is no authentication or progress
information, there's also a few small things missing (like actually
updating the local branch after fetching the remote, and the same when
saving), but I hope to get around to those separately.
Any comments about the preparatory patches?
Linus
More information about the subsurface
mailing list