diff options
| author | Mike Frysinger <vapier@google.com> | 2020-02-17 14:36:08 -0500 |
|---|---|---|
| committer | David Pursehouse <dpursehouse@collab.net> | 2020-02-19 00:24:43 +0000 |
| commit | c58ec4dba102d88fec67e833eb8421202eb4c1ea (patch) | |
| tree | c8c84e03f9359ae9dd126854069d34207c298831 /subcmds/init.py | |
| parent | e1191b3adb22e0b406db87691b13ddab2c236267 (diff) | |
| download | git-repo-c58ec4dba102d88fec67e833eb8421202eb4c1ea.tar.gz | |
avoid negative variables
Trying to use booleans with names like "no_xxx" are hard to follow due
to the double negatives. Invert all of them so we only have positive
meanings to follow.
Change-Id: Ifd37d0368f97034d94aa2cf38db52c723ac0c6ed
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255493
Tested-by: Mike Frysinger <vapier@google.com>
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Diffstat (limited to 'subcmds/init.py')
| -rw-r--r-- | subcmds/init.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index dde97286..3c68c2c3 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
| @@ -146,10 +146,10 @@ to update the working directory files. | |||
| 146 | 'platform group [auto|all|none|linux|darwin|...]', | 146 | 'platform group [auto|all|none|linux|darwin|...]', |
| 147 | metavar='PLATFORM') | 147 | metavar='PLATFORM') |
| 148 | g.add_option('--no-clone-bundle', | 148 | g.add_option('--no-clone-bundle', |
| 149 | dest='no_clone_bundle', action='store_true', | 149 | dest='clone_bundle', default=True, action='store_false', |
| 150 | help='disable use of /clone.bundle on HTTP/HTTPS') | 150 | help='disable use of /clone.bundle on HTTP/HTTPS') |
| 151 | g.add_option('--no-tags', | 151 | g.add_option('--no-tags', |
| 152 | dest='no_tags', action='store_true', | 152 | dest='tags', default=True, action='store_false', |
| 153 | help="don't fetch tags in the manifest") | 153 | help="don't fetch tags in the manifest") |
| 154 | 154 | ||
| 155 | # Tool | 155 | # Tool |
| @@ -161,7 +161,7 @@ to update the working directory files. | |||
| 161 | dest='repo_branch', | 161 | dest='repo_branch', |
| 162 | help='repo branch or revision', metavar='REVISION') | 162 | help='repo branch or revision', metavar='REVISION') |
| 163 | g.add_option('--no-repo-verify', | 163 | g.add_option('--no-repo-verify', |
| 164 | dest='no_repo_verify', action='store_true', | 164 | dest='repo_verify', default=True, action='store_false', |
| 165 | help='do not verify repo source code') | 165 | help='do not verify repo source code') |
| 166 | 166 | ||
| 167 | # Other | 167 | # Other |
| @@ -281,9 +281,9 @@ to update the working directory files. | |||
| 281 | m.config.SetString('repo.submodules', 'true') | 281 | m.config.SetString('repo.submodules', 'true') |
| 282 | 282 | ||
| 283 | if not m.Sync_NetworkHalf(is_new=is_new, quiet=opt.quiet, | 283 | if not m.Sync_NetworkHalf(is_new=is_new, quiet=opt.quiet, |
| 284 | clone_bundle=not opt.no_clone_bundle, | 284 | clone_bundle=opt.clone_bundle, |
| 285 | current_branch_only=opt.current_branch_only, | 285 | current_branch_only=opt.current_branch_only, |
| 286 | no_tags=opt.no_tags, submodules=opt.submodules, | 286 | tags=opt.tags, submodules=opt.submodules, |
| 287 | clone_filter=opt.clone_filter): | 287 | clone_filter=opt.clone_filter): |
| 288 | r = m.GetRemote(m.remote.name) | 288 | r = m.GetRemote(m.remote.name) |
| 289 | print('fatal: cannot obtain manifest %s' % r.url, file=sys.stderr) | 289 | print('fatal: cannot obtain manifest %s' % r.url, file=sys.stderr) |
