pager: skip running the pager if it's set to 'cat'

Avoid useless uses of cat.
This commit is contained in:
Augie Fackler 2017-03-15 20:34:26 -04:00
parent dd0af0f250
commit 3839a3e429

View File

@ -935,6 +935,9 @@ class ui(object):
This is separate in part so that extensions (like chg) can
override how a pager is invoked.
"""
if command == 'cat':
# Save ourselves some work.
return
# If the command doesn't contain any of these characters, we
# assume it's a binary and exec it directly. This means for
# simple pager command configurations, we can degrade