From 1870db6e4176732275b8be728863f018561b533b Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Sun, 6 Feb 2022 19:37:35 -0600 Subject: [PATCH] Use shallow clones for submodules managed by rustbuild, not just bootstrap.py I missed this in https://github.com/rust-lang/rust/pull/89757; it made `x.py test src/bootstrap` very slow. --- src/bootstrap/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index e5f84d417bf0b..1a42d25c352d3 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -527,7 +527,7 @@ impl Build { // Try passing `--progress` to start, then run git again without if that fails. let update = |progress: bool| { let mut git = Command::new("git"); - git.args(&["submodule", "update", "--init", "--recursive"]); + git.args(&["submodule", "update", "--init", "--recursive", "--depth=1"]); if progress { git.arg("--progress"); }