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>
This commit is contained in:
Mike Frysinger
2020-02-17 14:36:08 -05:00
committed by David Pursehouse
parent e1191b3adb
commit c58ec4dba1
7 changed files with 34 additions and 32 deletions

13
repo
View File

@@ -315,9 +315,11 @@ def GetParser(gitc_init=False):
help='restrict manifest projects to ones with a specified '
'platform group [auto|all|none|linux|darwin|...]',
metavar='PLATFORM')
group.add_option('--no-clone-bundle', action='store_true',
group.add_option('--no-clone-bundle',
dest='clone_bundle', default=True, action='store_false',
help='disable use of /clone.bundle on HTTP/HTTPS')
group.add_option('--no-tags', action='store_true',
group.add_option('--no-tags',
dest='tags', default=True, action='store_false',
help="don't fetch tags in the manifest")
# Tool.
@@ -326,7 +328,8 @@ def GetParser(gitc_init=False):
help='repo repository location ($REPO_URL)')
group.add_option('--repo-branch', metavar='REVISION',
help='repo branch or revision ($REPO_REV)')
group.add_option('--no-repo-verify', action='store_true',
group.add_option('--no-repo-verify',
dest='repo_verify', default=True, action='store_false',
help='do not verify repo source code')
# Other.
@@ -505,7 +508,7 @@ def _Init(args, gitc_init=False):
_CheckGitVersion()
try:
if opt.no_repo_verify:
if not opt.repo_verify:
do_verify = False
else:
if NeedSetupGnuPG():
@@ -514,7 +517,7 @@ def _Init(args, gitc_init=False):
do_verify = True
dst = os.path.abspath(os.path.join(repodir, S_repo))
_Clone(url, dst, opt.quiet, not opt.no_clone_bundle)
_Clone(url, dst, opt.quiet, opt.clone_bundle)
if do_verify:
rev = _Verify(dst, branch, opt.quiet)