Do not use the pager when the output is empty
[stgit] / stgit / commands / show.py
index 9537192..a3169b9 100644 (file)
@@ -43,4 +43,6 @@ def func(parser, options, args):
         parser.error('incorrect number of arguments')
 
     commit_id = git_id(patch)
-    pager(git.pretty_commit(commit_id))
+    commit_str = git.pretty_commit(commit_id)
+    if commit_str:
+        pager(commit_str)