Skip to content

Commit 9f0ef18

Browse files
authored
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 #63978. r? `@Mark-Simulacrum`
2 parents 06110c0 + 9177fa3 commit 9f0ef18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/bootstrap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ def update_submodule(self, module, checked_out, recorded_submodules):
10011001
run(["git", "submodule", "-q", "sync", module],
10021002
cwd=self.rust_root, verbose=self.verbose)
10031003

1004-
update_args = ["git", "submodule", "update", "--init", "--recursive"]
1004+
update_args = ["git", "submodule", "update", "--init", "--recursive", "--depth=1"]
10051005
if self.git_version >= distutils.version.LooseVersion("2.11.0"):
10061006
update_args.append("--progress")
10071007
update_args.append(module)

0 commit comments

Comments
 (0)