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:
Mike Frysinger
2021-05-03 01:21:35 -04:00
parent 7356114d90
commit d68ed63328
3 changed files with 11 additions and 5 deletions

View File

@ -234,8 +234,11 @@ later is required to fix a server side protocol bug.
help='fetch submodules from server')
p.add_option('--use-superproject', action='store_true',
help='use the manifest superproject to sync projects')
p.add_option('--tags',
action='store_false',
help='fetch tags')
p.add_option('--no-tags',
dest='tags', default=True, action='store_false',
dest='tags', action='store_false',
help="don't fetch tags")
p.add_option('--optimized-fetch',
dest='optimized_fetch', action='store_true',