diff options
| author | Mike Frysinger <vapier@google.com> | 2022-08-18 07:20:57 -0400 |
|---|---|---|
| committer | Mike Frysinger <vapier@google.com> | 2022-08-18 19:12:21 +0000 |
| commit | 076d54652e0025e1360f66e483926477b910b02e (patch) | |
| tree | 8f28f9ab60c0d7d47f2ad81e0ba9682f053a98c9 /subcmds | |
| parent | 790f4cea7aa95667296e0aa22eb0690df91c45e8 (diff) | |
| download | git-repo-076d54652e0025e1360f66e483926477b910b02e.tar.gz | |
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 <vapier@google.com>
Reviewed-by: LaMont Jones <lamontjones@google.com>
Diffstat (limited to 'subcmds')
| -rw-r--r-- | subcmds/init.py | 4 |
1 files changed, 4 insertions, 0 deletions
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. | |||
| 109 | Args: | 109 | Args: |
| 110 | opt: options from optparse. | 110 | opt: options from optparse. |
| 111 | """ | 111 | """ |
| 112 | # Normally this value is set when instantiating the project, but the | ||
| 113 | # manifest project is special and is created when instantiating the | ||
| 114 | # manifest which happens before we parse options. | ||
| 115 | self.manifest.manifestProject.clone_depth = opt.manifest_depth | ||
| 112 | if not self.manifest.manifestProject.Sync( | 116 | if not self.manifest.manifestProject.Sync( |
| 113 | manifest_url=opt.manifest_url, | 117 | manifest_url=opt.manifest_url, |
| 114 | manifest_branch=opt.manifest_branch, | 118 | manifest_branch=opt.manifest_branch, |
