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 --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index ec031a4c..9846d24f 100755 --- a/main.py +++ b/main.py @@ -108,7 +108,7 @@ global_options.add_option('-p', '--paginate', 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 @@ class _Repo(object): 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 -- cgit v1.2.3-54-g00ecf