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 <vapier@google.com>
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
This commit is contained in:
Mike Frysinger 2020-02-19 01:17:56 -05:00 committed by David Pursehouse
parent 7a753b8b18
commit 8a98efee5c

View File

@ -222,7 +222,7 @@ class _Repo(object):
file=sys.stderr) file=sys.stderr)
return 1 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 config = cmd.manifest.globalConfig
if gopts.pager: if gopts.pager:
use_pager = True use_pager = True