~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Infrastructure for current directory handling
[stgit]
/
stgit
/
commands
/
show.py
diff --git
a/stgit/commands/show.py
b/stgit/commands/show.py
index
2b22744
..
7efb4e1
100644
(file)
--- a/
stgit/commands/show.py
+++ b/
stgit/commands/show.py
@@
-30,6
+30,7
@@
Show the commit log and the diff corresponding to the given
patches. The output is similar to that generated by the 'git show'
command."""
patches. The output is similar to that generated by the 'git show'
command."""
+directory = DirectoryHasRepository()
options = [make_option('-b', '--branch',
help = 'use BRANCH instead of the default one'),
make_option('-a', '--applied',
options = [make_option('-b', '--branch',
help = 'use BRANCH instead of the default one'),
make_option('-a', '--applied',
@@
-55,7
+56,12
@@
def func(parser, options, args):
elif len(args) == 0:
patches = ['HEAD']
else:
elif len(args) == 0:
patches = ['HEAD']
else:
- patches = parse_patches(args, applied + unapplied +\
+ if len(args) == 1 and args[0].find('..') == -1 \
+ and not crt_series.patch_exists(args[0]):
+ # it might be just a commit id
+ patches = args
+ else:
+ patches = parse_patches(args, applied + unapplied +\
crt_series.get_hidden(), len(applied))
if options.diff_opts:
crt_series.get_hidden(), len(applied))
if options.diff_opts: