{"thread":{"id":"9050","subject":"[StGIT PATCH] Revert 'Disallow non-patch args to \"stg show\" (gna #8453).'","startedAt":"2007-07-15T21:32:11Z","lastAt":"2007-07-15T21:32:11Z","messageCount":1,"participants":["Yann Dirson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"47460","messageId":"20070715213211.6855.69618.stgit@gandelf.nowhere.earth","threadId":"9050","inReplyTo":null,"subject":"[StGIT PATCH] Revert 'Disallow non-patch args to \"stg show\" (gna #8453).'","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-07-15T21:32:11Z","receivedAt":"2007-07-15T21:32:11Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"This patch has a lot of side-effects that will break people's\nexpectations.  There is much more that just this to do if we want to\nsanitize patch/commit/range addressing on the command-line, so that\nwill wait till after 0.13.\n\nSigned-off-by: Yann Dirson <ydirson@altern.org>\n---\n\n stgit/commands/show.py |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\ndiff --git a/stgit/commands/show.py b/stgit/commands/show.py\nindex 2b22744..45ca253 100644\n--- a/stgit/commands/show.py\n+++ b/stgit/commands/show.py\n@@ -55,7 +55,12 @@ def func(parser, options, args):\n     elif len(args) == 0:\n         patches = ['HEAD']\n     else:\n-        patches = parse_patches(args, applied + unapplied +\\\n+        if len(args) == 1 and args[0].find('..') == -1 \\\n+               and not crt_series.patch_exists(args[0]):\n+            # it might be just a commit id\n+            patches = args\n+        else:\n+            patches = parse_patches(args, applied + unapplied +\\\n                                 crt_series.get_hidden(), len(applied))\n \n     if options.diff_opts:\n"}]}