diff options
-rw-r--r-- | man/repo-gitc-init.1 | 4 | ||||
-rw-r--r-- | man/repo-init.1 | 4 | ||||
-rwxr-xr-x | repo | 3 | ||||
-rw-r--r-- | subcmds/init.py | 4 |
4 files changed, 15 insertions, 0 deletions
diff --git a/man/repo-gitc-init.1 b/man/repo-gitc-init.1 index 88136de6..d6ef5ab6 100644 --- a/man/repo-gitc-init.1 +++ b/man/repo-gitc-init.1 | |||
@@ -45,6 +45,10 @@ sync any submodules associated with the manifest repo | |||
45 | \fB\-\-standalone\-manifest\fR | 45 | \fB\-\-standalone\-manifest\fR |
46 | download the manifest as a static file rather then | 46 | download the manifest as a static file rather then |
47 | create a git checkout of the manifest repo | 47 | create a git checkout of the manifest repo |
48 | .TP | ||
49 | \fB\-\-manifest\-depth\fR=\fI\,DEPTH\/\fR | ||
50 | create a shallow clone of the manifest repo with given | ||
51 | depth; see git clone (default: 1) | ||
48 | .SS Manifest (only) checkout options: | 52 | .SS Manifest (only) checkout options: |
49 | .TP | 53 | .TP |
50 | \fB\-\-current\-branch\fR | 54 | \fB\-\-current\-branch\fR |
diff --git a/man/repo-init.1 b/man/repo-init.1 index 32b3ea1b..0d45bf78 100644 --- a/man/repo-init.1 +++ b/man/repo-init.1 | |||
@@ -45,6 +45,10 @@ sync any submodules associated with the manifest repo | |||
45 | \fB\-\-standalone\-manifest\fR | 45 | \fB\-\-standalone\-manifest\fR |
46 | download the manifest as a static file rather then | 46 | download the manifest as a static file rather then |
47 | create a git checkout of the manifest repo | 47 | create a git checkout of the manifest repo |
48 | .TP | ||
49 | \fB\-\-manifest\-depth\fR=\fI\,DEPTH\/\fR | ||
50 | create a shallow clone of the manifest repo with given | ||
51 | depth; see git clone (default: 1) | ||
48 | .SS Manifest (only) checkout options: | 52 | .SS Manifest (only) checkout options: |
49 | .TP | 53 | .TP |
50 | \fB\-c\fR, \fB\-\-current\-branch\fR | 54 | \fB\-c\fR, \fB\-\-current\-branch\fR |
@@ -316,6 +316,9 @@ def InitParser(parser, gitc_init=False): | |||
316 | help='download the manifest as a static file ' | 316 | help='download the manifest as a static file ' |
317 | 'rather then create a git checkout of ' | 317 | 'rather then create a git checkout of ' |
318 | 'the manifest repo') | 318 | 'the manifest repo') |
319 | group.add_option('--manifest-depth', type='int', default=1, metavar='DEPTH', | ||
320 | help='create a shallow clone of the manifest repo with ' | ||
321 | 'given depth; see git clone (default: %default)') | ||
319 | 322 | ||
320 | # Options that only affect manifest project, and not any of the projects | 323 | # Options that only affect manifest project, and not any of the projects |
321 | # specified in the manifest itself. | 324 | # specified in the manifest itself. |
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, |