From 8a98efee5ceffcdbe952101e5b4126531cb0bd7e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 19 Feb 2020 01:17:56 -0500 Subject: [PATCH] main: fix pager logic after negation cleanup The pager setting is tristate (where None means "auto"), so make sure we still handle that setting. Change-Id: I89fe352572dd15922c61e3bb65ac33f847d01ee0 Test: `repo help upload` triggers the pager Test: `repo -p help upload` triggers the pager Test: `repo --no-pager help upload` doesn't trigger the pager Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255852 Tested-by: Mike Frysinger Reviewed-by: David Pursehouse --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 9846d24f..2422e8be 100755 --- a/main.py +++ b/main.py @@ -222,7 +222,7 @@ class _Repo(object): file=sys.stderr) return 1 - if gopts.pager and not isinstance(cmd, InteractiveCommand): + if gopts.pager is not False and not isinstance(cmd, InteractiveCommand): config = cmd.manifest.globalConfig if gopts.pager: use_pager = True