From c58ec4dba102d88fec67e833eb8421202eb4c1ea Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 17 Feb 2020 14:36:08 -0500 Subject: 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 Reviewed-by: David Pursehouse --- project.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'project.py') diff --git a/project.py b/project.py index 8bef9a85..bfe4a340 100644 --- a/project.py +++ b/project.py @@ -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') -- cgit v1.2.3-54-g00ecf