chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not use the pager when the output is empty
[stgit]
/
stgit
/
commands
/
show.py
diff --git
a/stgit/commands/show.py
b/stgit/commands/show.py
index 50eb376af2a80ad89f556e3274cc89967688dfa6..a3169b90d0148fcc3c4a7cb82d70275d23d529c6 100644
(file)
--- a/
stgit/commands/show.py
+++ b/
stgit/commands/show.py
@@
-17,6
+17,7
@@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import sys, os
from optparse import OptionParser, make_option
import sys, os
from optparse import OptionParser, make_option
+from pydoc import pager
from stgit.commands.common import *
from stgit import git
from stgit.commands.common import *
from stgit import git
@@
-42,4
+43,6
@@
def func(parser, options, args):
parser.error('incorrect number of arguments')
commit_id = git_id(patch)
parser.error('incorrect number of arguments')
commit_id = git_id(patch)
- sys.stdout.write(git.pretty_commit(commit_id))
+ commit_str = git.pretty_commit(commit_id)
+ if commit_str:
+ pager(commit_str)