init/sync: add --no-tags to match --tags
While this provides a way to undo earlier command line options (e.g. `repo sync --tags --no-tags`) which can be helpful for scripting & automation, this more importantly allows the user to override the manifest settings for syncing tags from a project. Bug: https://crbug.com/gerrit/12401 Change-Id: Id4c36cd82e6ca7cb073b5d63a09f6c7ccdebba83 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/304904 Reviewed-by: Raman Tenneti <rtenneti@google.com> Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
7356114d90
commit
d68ed63328
3 changed files with 11 additions and 5 deletions
|
@ -1044,7 +1044,7 @@ class Project(object):
|
|||
current_branch_only=None,
|
||||
force_sync=False,
|
||||
clone_bundle=True,
|
||||
tags=True,
|
||||
tags=None,
|
||||
archive=False,
|
||||
optimized_fetch=False,
|
||||
retry_fetches=0,
|
||||
|
@ -1125,8 +1125,8 @@ class Project(object):
|
|||
elif self.manifest.default.sync_c:
|
||||
current_branch_only = True
|
||||
|
||||
if not self.sync_tags:
|
||||
tags = False
|
||||
if tags is None:
|
||||
tags = self.sync_tags
|
||||
|
||||
if self.clone_depth:
|
||||
depth = self.clone_depth
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue