Use shallow clones for submodules

This reduces the amount of git history downloaded from ~67M to ~11M.
This commit is contained in:
Joshua Nelson 2021-10-10 22:34:10 -05:00
parent f8751436ff
commit 9177fa3dd2

View file

@ -990,7 +990,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)