<p dir="ltr"><br>
On Feb 9, 2015 8:16 AM, "Dirk Hohndel" <<a href="mailto:dirk@hohndel.org">dirk@hohndel.org</a>> wrote:<br>
><br>
> > I originally wanted to create a local cache of a remote git repository -<br>
> > multiple branches and all. But the remote tracking branch behavior of<br>
> > libgit2 was too confusing, and I eventually realized that I also want to<br>
> > have a branch actually checked out in that local repository, so I ended up<br>
> > modifying the "local cache" model so that each *branch* has its own local<br>
> > cache.<br>
><br>
> So if someone (like you and I) has multiple branches in one repository,<br>
> they can still make this work by simply having two different base<br>
> directories locally?</p>
<p dir="ltr">No need. There can be multiple git caches, they are all hidden and indexed by the hash of the remote address.</p>
<p dir="ltr">So it's easy to do</p>
<p dir="ltr">    subsurface file:///home/torvalds/scuba-mirror[linus]</p>
<p dir="ltr">and then do</p>
<p dir="ltr">    subsurface file:///home/torvalds/scuba-mirror[hohndel]</p>
<p dir="ltr">and both of them work - it just crates two separate caches. So there will be some duplication in this case, and wasted disk space, but it all works, I've tested this part quite a lot </p>
<p dir="ltr">However, it's all *impractical* right now due to the lack of ssh authentication and any GUI for progress (so that you could cancel the update etc with slow networks). And there are a few other missing pieces. But I think the core design is ok and in principle all the patches are fine to apply, because it won't hurt any of the existing cases.</p>
<p dir="ltr">]<br>
> > but sadly, I never got around to actually figuring out why libgit2 doesn't<br>
> > use the SSH config file, and how the authentication is supposed to work.<br>
><br>
> That's kind of a critical piece, though, as my assumption is that people<br>
> will want to have at least somewhat private repos...</p>
<p dir="ltr">Yes. I'm a bit worried about how libgit2 doesn't seem to look up the ssh config file at all, so even ssh access with just a private jet and no passphrase doesn't work. </p>
<p dir="ltr">The reason that works me is that implies that libgit2 doesn't do the whole "run ssh externally" at all. The slow local fetch bug I reported also seemed to imply that. So I'm worried about how hard it will be to get ssh access at all with it. </p>
<p dir="ltr">But my core cache reorganization meant that I never really liked at this part at all. Maybe it will be simple. Maybe it will be fundamentally hard. Don't know.</p>
<p dir="ltr">> Since they were all signed off I assume you are OK with me putting them<br>
> into master once I've done some testing?</p>
<p dir="ltr">Yes. I don't think there is anything wrong with any of them, just perhaps missing stuff. ID like some qt person to take a look at my pathname crud, but I think it works. I may end up getting rid of the "git-caches" part of the pathname just to avoid problems with windows, but that's in the last patch, doesn't affect the earlier ones </p>
<p dir="ltr">   Linus<br>
</p>