-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Reuse existing GIT checkouts if an update happens #4373
Comments
I'm not sure what the context of this issue is (even in 2017). Git dependencies are updated incrementally whenever they are updated. Perhaps this issue was related to git submodules, which do re-clone each time. There is a more detailed issue tracking that in #7987, so I'm going to close this. If there is something else, feel free to re-open with more detail or file a new issue. |
I think this is still relevant, or something else is going on. When running |
@sdroege is it a public repo that I can look at? Do you know roughly how large it is, and how much network traffic Can you run with the It should do an incremental update, but perhaps there is something broken with how it is interacting with the repo? I'm also curious what kind of remote server it is. |
Just a short reply for now, will get back with more details later once I have more time. But a good example would be the gtk-rs examples repo here: https://github.com/gtk-rs/examples/ . Whenever there is an update in any of the git dependencies (there are many), it takes quite a while to do And there are lots of checkouts then, e.g. in
Each a full clone of the repository at a specific commit. |
It clones a separate copy on disk for each checkout, but they are sourced from the same local repository in the I did do some tests with a roughly 450MB repo, and it was a little sluggish (about 12 seconds compared to command-line git taking about 5 seconds to locally clone). There is probably not much we can do about that directly, since it is managed by libgit2. If you can reproduce problems where it is actually re-downloading the entire repo, or otherwise using excessive network, or takes an abnormally long amount of time to update, let me know! Otherwise, #7150 is the meta-tracking issue for excessive cache usage. Cargo would probably need some tracking to know which projects are using various checkouts to know if it is ok to delete old ones. |
Currently cargo seems to do a full clone again when a GIT repository was updated, wasting quite a bit of bandwidth. It would be good if it could pass --reference to git with the previous version.
This is currently a bit problematic if you're on mobile data :)
The text was updated successfully, but these errors were encountered: