about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-10-13 22:51:02 +0200
committerGitHub <noreply@github.com>2021-10-13 22:51:02 +0200
commit9f0ef184b815318bf044194e150f612a3d898105 (patch)
treee85dcc1fad7f6843c4b00ca51f301fad71a8e840 /src/bootstrap
parent06110c0c466e46d48d0bf01b43cf0ad5a01391b2 (diff)
parent9177fa3dd23945a8add858cfce893bb25194e0fe (diff)
downloadrust-9f0ef184b815318bf044194e150f612a3d898105.tar.gz
rust-9f0ef184b815318bf044194e150f612a3d898105.zip
Rollup merge of #89757 - jyn514:submodule, r=Mark-Simulacrum
Use shallow clones for submodules

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 https://github.com/rust-lang/rust/issues/63978. r? `@Mark-Simulacrum`
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/bootstrap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 1859130a7af..0170be967e1 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -1001,7 +1001,7 @@ class RustBuild(object):
         run(["git", "submodule", "-q", "sync", module],
             cwd=self.rust_root, verbose=self.verbose)
 
-        update_args = ["git", "submodule", "update", "--init", "--recursive"]
+        update_args = ["git", "submodule", "update", "--init", "--recursive", "--depth=1"]
         if self.git_version >= distutils.version.LooseVersion("2.11.0"):
             update_args.append("--progress")
         update_args.append(module)