pager: skip running the pager if it's set to 'cat'
authorAugie Fackler <augie@google.com>
Wed, 15 Mar 2017 20:34:26 -0400
changeset 31479 96929bd6e58d
parent 31478 9335dc6b2a9c
child 31480 07fe520280d2
pager: skip running the pager if it's set to 'cat' Avoid useless uses of cat.
mercurial/ui.py
--- a/mercurial/ui.py	Wed Mar 15 20:33:47 2017 -0400
+++ b/mercurial/ui.py	Wed Mar 15 20:34:26 2017 -0400
@@ -935,6 +935,9 @@
         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