diff options
-rw-r--r-- | man/repo-gitc-init.1 | 6 | ||||
-rw-r--r-- | man/repo-init.1 | 6 | ||||
-rw-r--r-- | man/repo-manifest.1 | 12 | ||||
-rwxr-xr-x | repo | 4 | ||||
-rw-r--r-- | subcmds/init.py | 4 |
5 files changed, 28 insertions, 4 deletions
diff --git a/man/repo-gitc-init.1 b/man/repo-gitc-init.1 index 88136de6..02581c69 100644 --- a/man/repo-gitc-init.1 +++ b/man/repo-gitc-init.1 | |||
@@ -1,5 +1,5 @@ | |||
1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. | 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. |
2 | .TH REPO "1" "August 2022" "repo gitc-init" "Repo Manual" | 2 | .TH REPO "1" "October 2022" "repo gitc-init" "Repo Manual" |
3 | .SH NAME | 3 | .SH NAME |
4 | repo \- repo gitc-init - manual page for repo gitc-init | 4 | repo \- repo gitc-init - manual page for repo gitc-init |
5 | .SH SYNOPSIS | 5 | .SH SYNOPSIS |
@@ -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 (0 for full clone); see git clone (default: 0) | ||
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..cf93de1f 100644 --- a/man/repo-init.1 +++ b/man/repo-init.1 | |||
@@ -1,5 +1,5 @@ | |||
1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. | 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. |
2 | .TH REPO "1" "August 2022" "repo init" "Repo Manual" | 2 | .TH REPO "1" "October 2022" "repo init" "Repo Manual" |
3 | .SH NAME | 3 | .SH NAME |
4 | repo \- repo init - manual page for repo init | 4 | repo \- repo init - manual page for repo init |
5 | .SH SYNOPSIS | 5 | .SH SYNOPSIS |
@@ -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 (0 for full clone); see git clone (default: 0) | ||
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 |
diff --git a/man/repo-manifest.1 b/man/repo-manifest.1 index 382918ce..e49836ca 100644 --- a/man/repo-manifest.1 +++ b/man/repo-manifest.1 | |||
@@ -1,5 +1,5 @@ | |||
1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. | 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. |
2 | .TH REPO "1" "July 2022" "repo manifest" "Repo Manual" | 2 | .TH REPO "1" "October 2022" "repo manifest" "Repo Manual" |
3 | .SH NAME | 3 | .SH NAME |
4 | repo \- repo manifest - manual page for repo manifest | 4 | repo \- repo manifest - manual page for repo manifest |
5 | .SH SYNOPSIS | 5 | .SH SYNOPSIS |
@@ -190,6 +190,8 @@ CDATA #IMPLIED> | |||
190 | <!ATTLIST extend\-project groups CDATA #IMPLIED> | 190 | <!ATTLIST extend\-project groups CDATA #IMPLIED> |
191 | <!ATTLIST extend\-project revision CDATA #IMPLIED> | 191 | <!ATTLIST extend\-project revision CDATA #IMPLIED> |
192 | <!ATTLIST extend\-project remote CDATA #IMPLIED> | 192 | <!ATTLIST extend\-project remote CDATA #IMPLIED> |
193 | <!ATTLIST extend\-project dest\-branch CDATA #IMPLIED> | ||
194 | <!ATTLIST extend\-project upstream CDATA #IMPLIED> | ||
193 | .IP | 195 | .IP |
194 | <!ELEMENT remove\-project EMPTY> | 196 | <!ELEMENT remove\-project EMPTY> |
195 | <!ATTLIST remove\-project name CDATA #REQUIRED> | 197 | <!ATTLIST remove\-project name CDATA #REQUIRED> |
@@ -485,6 +487,12 @@ project. Same syntax as the corresponding element of `project`. | |||
485 | Attribute `remote`: If specified, overrides the remote of the original project. | 487 | Attribute `remote`: If specified, overrides the remote of the original project. |
486 | Same syntax as the corresponding element of `project`. | 488 | Same syntax as the corresponding element of `project`. |
487 | .PP | 489 | .PP |
490 | Attribute `dest\-branch`: If specified, overrides the dest\-branch of the original | ||
491 | project. Same syntax as the corresponding element of `project`. | ||
492 | .PP | ||
493 | Attribute `upstream`: If specified, overrides the upstream of the original | ||
494 | project. Same syntax as the corresponding element of `project`. | ||
495 | .PP | ||
488 | Element annotation | 496 | Element annotation |
489 | .PP | 497 | .PP |
490 | Zero or more annotation elements may be specified as children of a project or | 498 | Zero or more annotation elements may be specified as children of a project or |
@@ -600,7 +608,7 @@ included manifest belong. This appends and recurses, meaning all projects in | |||
600 | included manifests carry all parent include groups. Same syntax as the | 608 | included manifests carry all parent include groups. Same syntax as the |
601 | corresponding element of `project`. | 609 | corresponding element of `project`. |
602 | .PP | 610 | .PP |
603 | Local Manifests | 611 | Local Manifests |
604 | .PP | 612 | .PP |
605 | Additional remotes and projects may be added through local manifest files stored | 613 | Additional remotes and projects may be added through local manifest files stored |
606 | in `$TOP_DIR/.repo/local_manifests/*.xml`. | 614 | in `$TOP_DIR/.repo/local_manifests/*.xml`. |
@@ -316,6 +316,10 @@ 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=0, metavar='DEPTH', | ||
320 | help='create a shallow clone of the manifest repo with ' | ||
321 | 'given depth (0 for full clone); see git clone ' | ||
322 | '(default: %default)') | ||
319 | 323 | ||
320 | # Options that only affect manifest project, and not any of the projects | 324 | # Options that only affect manifest project, and not any of the projects |
321 | # specified in the manifest itself. | 325 | # specified in the manifest itself. |
diff --git a/subcmds/init.py b/subcmds/init.py index cae0e342..0c979cd4 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, |