chiark / gitweb /
Disallow non-patch args to "stg show" (gna #8453).
authorYann Dirson <ydirson@altern.org>
Fri, 13 Jul 2007 22:43:55 +0000 (23:43 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Fri, 13 Jul 2007 22:43:55 +0000 (23:43 +0100)
Git-core refs and patch@branch args were not allowed in the
multiple-argument form of "stg show".  For consistency we completely
disallow them: git-core refs are available from git-show, and "stg
show patch@branch" as "stg show patch -b branch".

Signed-off-by: Yann Dirson <ydirson@altern.org>
stgit/commands/show.py

index c59ac689a5c2fd5d43769dba9774e65c1264bdfe..3bf4f20c2e4e715f36494480b68240876d2dfc14 100644 (file)
@@ -55,12 +55,7 @@ def func(parser, options, args):
     elif len(args) == 0:
         patches = ['HEAD']
     else:
-        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, len(applied))
+        patches = parse_patches(args, applied + unapplied, len(applied))
 
     if options.diff_opts:
         diff_flags = options.diff_opts.split()