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>
diff --git a/project.py b/project.py
index 8bef9a8..bfe4a34 100644
--- a/project.py
+++ b/project.py
@@ -1432,7 +1432,7 @@
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 @@
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 @@
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 @@
quiet=False,
verbose=False,
alt_dir=None,
- no_tags=False,
+ tags=True,
prune=False,
depth=None,
submodules=False,
@@ -2355,7 +2354,7 @@
# 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')