mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-12-14 08:34:01 +08:00
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:
committed by
David Pursehouse
parent
e1191b3adb
commit
c58ec4dba1
13
project.py
13
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')
|
||||
|
||||
Reference in New Issue
Block a user