From 076d54652e0025e1360f66e483926477b910b02e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 18 Aug 2022 07:20:57 -0400 Subject: init: change --depth default to 1 for manifest repo People rarely care about the history of the manifest repo. Change the default to 1 to speed up initial setup. If people really want the full history, they can pass --manifest-depth=0. We can't reuse the existing --depth option because that applies to all projects we clone, not just the manifest repo. Bug: https://crbug.com/gerrit/16193 Change-Id: Ideab1712e9ffc743b9bae97903e074d7d429b134 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/343435 Tested-by: Mike Frysinger Reviewed-by: LaMont Jones --- subcmds/init.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'subcmds/init.py') diff --git a/subcmds/init.py b/subcmds/init.py index e4df6b37..bcccae06 100644 --- a/subcmds/init.py +++ b/subcmds/init.py @@ -109,6 +109,10 @@ to update the working directory files. Args: opt: options from optparse. """ + # Normally this value is set when instantiating the project, but the + # manifest project is special and is created when instantiating the + # manifest which happens before we parse options. + self.manifest.manifestProject.clone_depth = opt.manifest_depth if not self.manifest.manifestProject.Sync( manifest_url=opt.manifest_url, manifest_branch=opt.manifest_branch, -- cgit v1.2.3-54-g00ecf