-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Use shallow clones for submodules #89757
Conversation
This reduces the amount of git history downloaded from ~67M to ~11M.
Is this fixed by something? IIRC, this was (one of) the reasons we did not do this historically. I also have some recollection that fetching new commits in a shallow repository is more work for GitHub and the client, but I could be wrong about that... |
I'm not sure what error they ran into originally, but I tested cloning rust-lang/rust from scratch and having x.py do a shallow clone for the first time, and it worked fine.
Hmm, so in CocoaPods/CocoaPods#4989 (comment) Github said shallow clones were more expensive over time if you don't subsequently use --depth=1. But we do use --depth=1 in further updates; e.g. here's a change from nightly to 1.55, which has to update most submodules:
So I'm not sure that problem is relevant here. (We also don't have many thousands of people running |
Great! This seems fine to try at least then, and we can always revert easily if folks run into problems. It may also be that we can use this (presumably new) support to replace our current github archive fetching on CI (https://github.com/rust-lang/rust/blob/master/src/ci/init_repo.sh) which seems like a nice cleanup, but that doesn't need to happen in this PR. @bors r+ |
📌 Commit 9177fa3 has been approved by |
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#89347 (suggestion for typoed crate or module) - rust-lang#89670 (Improve `std::thread::available_parallelism` docs) - rust-lang#89757 (Use shallow clones for submodules) - rust-lang#89759 (Assemble the compiler when running `x.py build`) - rust-lang#89846 (Add `riscv32imc-esp-espidf` to 1.56 changelog) - rust-lang#89853 (Update the 1.56.0 release header for consistency) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…strap.py I missed this in rust-lang#89757; it made `x.py test src/bootstrap` very slow.
…rk-Simulacrum Use shallow clones for submodules managed by rustbuild, not just bootstrap.py I missed this in rust-lang#89757; it made `x.py test src/bootstrap` very slow.
…rk-Simulacrum Use shallow clones for submodules managed by rustbuild, not just bootstrap.py I missed this in rust-lang#89757; it made `x.py test src/bootstrap` very slow.
…rk-Simulacrum Use shallow clones for submodules managed by rustbuild, not just bootstrap.py I missed this in rust-lang#89757; it made `x.py test src/bootstrap` very slow.
This reduces the amount of git history downloaded for submodules from ~67M to ~11M. For comparison, a shallow clone of rust-lang/rust is 103M and a deep clone is 740M, so this almost halves the amount of history necessary if you made a shallow clone to start, and it's a significant reduction even if not.
Closes #63978. r? @Mark-Simulacrum