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

View File

@@ -1432,7 +1432,7 @@ class Project(object):
current_branch_only=False,
force_sync=False,
clone_bundle=True,
no_tags=False,
tags=True,
archive=False,
optimized_fetch=False,
prune=False,
@@ -1501,9 +1501,8 @@ class Project(object):
elif self.manifest.default.sync_c:
current_branch_only = True
if not no_tags:
if not self.sync_tags:
no_tags = True
if not self.sync_tags:
tags = False
if self.clone_depth:
depth = self.clone_depth
@@ -1517,7 +1516,7 @@ class Project(object):
if not self._RemoteFetch(
initial=is_new, quiet=quiet, verbose=verbose, alt_dir=alt_dir,
current_branch_only=current_branch_only,
no_tags=no_tags, prune=prune, depth=depth,
tags=tags, prune=prune, depth=depth,
submodules=submodules, force_sync=force_sync,
clone_filter=clone_filter):
return False
@@ -2197,7 +2196,7 @@ class Project(object):
quiet=False,
verbose=False,
alt_dir=None,
no_tags=False,
tags=True,
prune=False,
depth=None,
submodules=False,
@@ -2355,7 +2354,7 @@ class Project(object):
# If using depth then we should not get all the tags since they may
# be outside of the depth.
if no_tags or depth:
if not tags or depth:
cmd.append('--no-tags')
else:
cmd.append('--tags')