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/main.py b/main.py
index ec031a4..9846d24 100755
--- a/main.py
+++ b/main.py
@@ -108,7 +108,7 @@
dest='pager', action='store_true',
help='display command output in the pager')
global_options.add_option('--no-pager',
- dest='no_pager', action='store_true',
+ dest='pager', action='store_false',
help='disable the pager')
global_options.add_option('--color',
choices=('auto', 'always', 'never'), default=None,
@@ -222,7 +222,7 @@
file=sys.stderr)
return 1
- if not gopts.no_pager and not isinstance(cmd, InteractiveCommand):
+ if gopts.pager and not isinstance(cmd, InteractiveCommand):
config = cmd.manifest.globalConfig
if gopts.pager:
use_pager = True