summaryrefslogtreecommitdiffstats
path: root/subcmds/init.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/init.py')
-rw-r--r--subcmds/init.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 7617bc1f..fb6d3eb5 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -52,6 +52,10 @@ The optional -b argument can be used to select the manifest branch
52to checkout and use. If no branch is specified, the remote's default 52to checkout and use. If no branch is specified, the remote's default
53branch is used. This is equivalent to using -b HEAD. 53branch is used. This is equivalent to using -b HEAD.
54 54
55The optional --manifest-upstream-branch argument can be used when a commit is
56provided to --manifest-branch (or -b), to specify the name of the git ref in
57which the commit can be found.
58
55The optional -m argument can be used to specify an alternate manifest 59The optional -m argument can be used to specify an alternate manifest
56to be used. If no manifest is specified, the manifest default.xml 60to be used. If no manifest is specified, the manifest default.xml
57will be used. 61will be used.
@@ -135,6 +139,7 @@ to update the working directory files.
135 # manifest project is special and is created when instantiating the 139 # manifest project is special and is created when instantiating the
136 # manifest which happens before we parse options. 140 # manifest which happens before we parse options.
137 self.manifest.manifestProject.clone_depth = opt.manifest_depth 141 self.manifest.manifestProject.clone_depth = opt.manifest_depth
142 self.manifest.manifestProject.upstream = opt.manifest_upstream_branch
138 clone_filter_for_depth = ( 143 clone_filter_for_depth = (
139 "blob:none" if (_REPO_ALLOW_SHALLOW == "0") else None 144 "blob:none" if (_REPO_ALLOW_SHALLOW == "0") else None
140 ) 145 )
@@ -317,6 +322,12 @@ to update the working directory files.
317 " be used with --standalone-manifest." 322 " be used with --standalone-manifest."
318 ) 323 )
319 324
325 if opt.manifest_upstream_branch and opt.manifest_branch is None:
326 self.OptionParser.error(
327 "--manifest-upstream-branch cannot be used without "
328 "--manifest-branch."
329 )
330
320 if args: 331 if args:
321 if opt.manifest_url: 332 if opt.manifest_url:
322 self.OptionParser.error( 333 self.OptionParser.error(