Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update .gitmodules to use shallow submodule clones #113740

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

tgross35
Copy link
Contributor

This change makes submodule checkouts shallow by default. This significantly reduces the time needed to do a recursive checkout when --shallow-submodules is not specified, such as when x is not being used.

@rustbot
Copy link
Collaborator

rustbot commented Jul 16, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 16, 2023
@tgross35 tgross35 force-pushed the use-shallow-submodules branch from d975419 to b7a590a Compare July 16, 2023 01:00
This change makes submodule checkouts shallow by default. This
significantly reduces the time needed to do a recursive checkout when
`--shallow-submodules` is not specified, such as when `x` is not being
used.
@tgross35 tgross35 force-pushed the use-shallow-submodules branch from b7a590a to ffad01a Compare July 16, 2023 01:01
@Mark-Simulacrum
Copy link
Member

I seem to recall that shallow submodules break if the commit we're pinned to is "too far" from the tip that's being pulled - but maybe I am misremembering. I'll try to find evidence either way before merging.

@tgross35
Copy link
Contributor Author

There are always issues moving around history with shallow clones, like moving around branches when it can't find a common commit. And --force-with-lease doesn't work - could these things be it?

The same would be true for submodules, but I don't think that many people need to move around more than the single commit of interest (especially since I believe x already does a shallow checkout anyway)

@Mark-Simulacrum
Copy link
Member

OK, yeah, it looks like we already do this in bootstrap, so I think we can move forward. @bors r+

@bors
Copy link
Collaborator

bors commented Jul 31, 2023

📌 Commit ffad01a has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 31, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 31, 2023
…=Mark-Simulacrum

Update `.gitmodules` to use shallow submodule clones

This change makes submodule checkouts shallow by default. This significantly reduces the time needed to do a recursive checkout when `--shallow-submodules` is not specified, such as when `x` is not being used.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 31, 2023
…=Mark-Simulacrum

Update `.gitmodules` to use shallow submodule clones

This change makes submodule checkouts shallow by default. This significantly reduces the time needed to do a recursive checkout when `--shallow-submodules` is not specified, such as when `x` is not being used.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 31, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#112858 (Update Android system definitions and add riscv-linux-android as tier 3 target)
 - rust-lang#113717 (remove repetitive words)
 - rust-lang#113725 (Move MinGW linker dist option to proper section)
 - rust-lang#113740 (Update `.gitmodules` to use shallow submodule clones)
 - rust-lang#113889 (Fix ice tests when librustc-driver is linked dynamically)
 - rust-lang#113906 (etc: add `RUSTC_BOOTSTRAP` to rust-analyzer config)
 - rust-lang#113920 (fix(resolve): report unresolved imports firstly)
 - rust-lang#114111 (Improve test case for experimental API remove_matches)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ba196c2 into rust-lang:master Jul 31, 2023
@rustbot rustbot added this to the 1.73.0 milestone Jul 31, 2023
@tgross35 tgross35 deleted the use-shallow-submodules branch July 31, 2023 23:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants