From 9177fa3dd23945a8add858cfce893bb25194e0fe Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Sun, 10 Oct 2021 22:34:10 -0500 Subject: [PATCH] Use shallow clones for submodules This reduces the amount of git history downloaded from ~67M to ~11M. --- src/bootstrap/bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 05d7b0f611f72..9d64a254f619b 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -990,7 +990,7 @@ def update_submodule(self, module, checked_out, recorded_submodules): 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)