diff options
| author | LaMont Jones <lamontjones@google.com> | 2022-06-01 21:03:34 +0000 |
|---|---|---|
| committer | LaMont Jones <lamontjones@google.com> | 2022-06-08 16:49:08 +0000 |
| commit | ff6b1dae1e9f2e7405690c1aeedf7e0c7d768460 (patch) | |
| tree | c0ffaeea5ed6ccee683f47e6cef5a8897b130cb7 /command.py | |
| parent | bdcba7dc36f1c8e6041681eb5b3b5229c93c7c5c (diff) | |
| download | git-repo-ff6b1dae1e9f2e7405690c1aeedf7e0c7d768460.tar.gz | |
Only sync superproject if it will be used.
If the user says `--no-use-superproject`, then do not bother syncing the
superproject.
Also add/update docstrings and comments throughout.
Change-Id: I9cdad706130501bab9a22d3099a1dae605e9c194
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/338975
Tested-by: LaMont Jones <lamontjones@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'command.py')
| -rw-r--r-- | command.py | 12 |
1 files changed, 12 insertions, 0 deletions
| @@ -277,6 +277,18 @@ class Command(object): | |||
| 277 | def GetProjects(self, args, manifest=None, groups='', missing_ok=False, | 277 | def GetProjects(self, args, manifest=None, groups='', missing_ok=False, |
| 278 | submodules_ok=False, all_manifests=False): | 278 | submodules_ok=False, all_manifests=False): |
| 279 | """A list of projects that match the arguments. | 279 | """A list of projects that match the arguments. |
| 280 | |||
| 281 | Args: | ||
| 282 | args: a list of (case-insensitive) strings, projects to search for. | ||
| 283 | manifest: an XmlManifest, the manifest to use, or None for default. | ||
| 284 | groups: a string, the manifest groups in use. | ||
| 285 | missing_ok: a boolean, whether to allow missing projects. | ||
| 286 | submodules_ok: a boolean, whether to allow submodules. | ||
| 287 | all_manifests: a boolean, if True then all manifests and submanifests are | ||
| 288 | used. If False, then only the local (sub)manifest is used. | ||
| 289 | |||
| 290 | Returns: | ||
| 291 | A list of matching Project instances. | ||
| 280 | """ | 292 | """ |
| 281 | if all_manifests: | 293 | if all_manifests: |
| 282 | if not manifest: | 294 | if not manifest: |
