diff options
author | Mike Frysinger <vapier@google.com> | 2020-02-17 14:36:08 -0500 |
---|---|---|
committer | David Pursehouse <dpursehouse@collab.net> | 2020-02-19 00:24:43 +0000 |
commit | c58ec4dba102d88fec67e833eb8421202eb4c1ea (patch) | |
tree | c8c84e03f9359ae9dd126854069d34207c298831 /project.py | |
parent | e1191b3adb22e0b406db87691b13ddab2c236267 (diff) | |
download | git-repo-c58ec4dba102d88fec67e833eb8421202eb4c1ea.tar.gz |
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>
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -1432,7 +1432,7 @@ class Project(object): | |||
1432 | current_branch_only=False, | 1432 | current_branch_only=False, |
1433 | force_sync=False, | 1433 | force_sync=False, |
1434 | clone_bundle=True, | 1434 | clone_bundle=True, |
1435 | no_tags=False, | 1435 | tags=True, |
1436 | archive=False, | 1436 | archive=False, |
1437 | optimized_fetch=False, | 1437 | optimized_fetch=False, |
1438 | prune=False, | 1438 | prune=False, |
@@ -1501,9 +1501,8 @@ class Project(object): | |||
1501 | elif self.manifest.default.sync_c: | 1501 | elif self.manifest.default.sync_c: |
1502 | current_branch_only = True | 1502 | current_branch_only = True |
1503 | 1503 | ||
1504 | if not no_tags: | 1504 | if not self.sync_tags: |
1505 | if not self.sync_tags: | 1505 | tags = False |
1506 | no_tags = True | ||
1507 | 1506 | ||
1508 | if self.clone_depth: | 1507 | if self.clone_depth: |
1509 | depth = self.clone_depth | 1508 | depth = self.clone_depth |
@@ -1517,7 +1516,7 @@ class Project(object): | |||
1517 | if not self._RemoteFetch( | 1516 | if not self._RemoteFetch( |
1518 | initial=is_new, quiet=quiet, verbose=verbose, alt_dir=alt_dir, | 1517 | initial=is_new, quiet=quiet, verbose=verbose, alt_dir=alt_dir, |
1519 | current_branch_only=current_branch_only, | 1518 | current_branch_only=current_branch_only, |
1520 | no_tags=no_tags, prune=prune, depth=depth, | 1519 | tags=tags, prune=prune, depth=depth, |
1521 | submodules=submodules, force_sync=force_sync, | 1520 | submodules=submodules, force_sync=force_sync, |
1522 | clone_filter=clone_filter): | 1521 | clone_filter=clone_filter): |
1523 | return False | 1522 | return False |
@@ -2197,7 +2196,7 @@ class Project(object): | |||
2197 | quiet=False, | 2196 | quiet=False, |
2198 | verbose=False, | 2197 | verbose=False, |
2199 | alt_dir=None, | 2198 | alt_dir=None, |
2200 | no_tags=False, | 2199 | tags=True, |
2201 | prune=False, | 2200 | prune=False, |
2202 | depth=None, | 2201 | depth=None, |
2203 | submodules=False, | 2202 | submodules=False, |
@@ -2355,7 +2354,7 @@ class Project(object): | |||
2355 | 2354 | ||
2356 | # If using depth then we should not get all the tags since they may | 2355 | # If using depth then we should not get all the tags since they may |
2357 | # be outside of the depth. | 2356 | # be outside of the depth. |
2358 | if no_tags or depth: | 2357 | if not tags or depth: |
2359 | cmd.append('--no-tags') | 2358 | cmd.append('--no-tags') |
2360 | else: | 2359 | else: |
2361 | cmd.append('--tags') | 2360 | cmd.append('--tags') |