git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[StGIT PATCH] Revert 'Disallow non-patch args to "stg show" (gna #8453).'

From
Yann Dirson <ydirson@altern.org>
Date
Jul 15, 2007, 21:32 UTC
Message-ID
<20070715213211.6855.69618.stgit@gandelf.nowhere.earth>

This patch has a lot of side-effects that will break people's expectations. There is much more that just this to do if we want to sanitize patch/commit/range addressing on the command-line, so that will wait till after 0.13.

Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 stgit/commands/show.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/stgit/commands/show.py b/stgit/commands/show.py
index 2b22744..45ca253 100644
--- a/stgit/commands/show.py
+++ b/stgit/commands/show.py
@@ -55,7 +55,12 @@ def func(parser, options, args):
     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:
Message 1 of 1 in “Revert 'Disallow non-patch args to "stg show" (gna #8453).'”
  1. Revert 'Disallow non-patch args to "stg show" (gna #8453).'Yann Dirson, Jul 15, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.