-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework checkout mechanism again, again #9
Comments
Ok, picking this up again. Rather than rely upon the hardlink behaviour, I'm going to do
This works regardless of whether the temporary directory is on the same mount or not, which is a major advantage of relying upon hardlinks ✨ |
Wow, this is working really well and going much faster than I'd expected. I think having five months of noodling around in Rust code has taught me some pretty good habits, and a lot of the skills were transferable. |
Still todo:
|
Just some logging improvements left! |
Merged. |
Ok, this time I think I've finally got something pretty performant with minimal hacks.
Here's a series of bash commands I used to do this on a repo with nested submodules (https://github.com/capnfabs/grouse/blob/master/test-fixtures/nested-submodules-missing-submodules.zip)
So basically, the idea is:
git submodule update
.Something that I don't love about this is -- you can't use
git submodule update --depth 1
for nested submodules, because under some circumstances, they point at commits (which you can't fetch directly from remotes). This is just a git problem in general though.I tested this all on git 2.7.4, which is the current version running on Ubuntu LTS Xenial. I think it would be good to try on git 2.1.4 (Debian Jessie) as well -- but that's probably the oldest stable version we need to support by a long way.
Quick note to performance -- apparently if the cloned repo is on the same disk, then git uses hardlinks so this is mega fast (see Local Protocols in Git On the Server)
The text was updated successfully, but these errors were encountered: