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 /main.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 'main.py')
-rwxr-xr-x | main.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -108,7 +108,7 @@ global_options.add_option('-p', '--paginate', | |||
108 | dest='pager', action='store_true', | 108 | dest='pager', action='store_true', |
109 | help='display command output in the pager') | 109 | help='display command output in the pager') |
110 | global_options.add_option('--no-pager', | 110 | global_options.add_option('--no-pager', |
111 | dest='no_pager', action='store_true', | 111 | dest='pager', action='store_false', |
112 | help='disable the pager') | 112 | help='disable the pager') |
113 | global_options.add_option('--color', | 113 | global_options.add_option('--color', |
114 | choices=('auto', 'always', 'never'), default=None, | 114 | choices=('auto', 'always', 'never'), default=None, |
@@ -222,7 +222,7 @@ class _Repo(object): | |||
222 | file=sys.stderr) | 222 | file=sys.stderr) |
223 | return 1 | 223 | return 1 |
224 | 224 | ||
225 | if not gopts.no_pager and not isinstance(cmd, InteractiveCommand): | 225 | if gopts.pager and not isinstance(cmd, InteractiveCommand): |
226 | config = cmd.manifest.globalConfig | 226 | config = cmd.manifest.globalConfig |
227 | if gopts.pager: | 227 | if gopts.pager: |
228 | use_pager = True | 228 | use_pager = True |