From: Yann Dirson <ydirson@altern.org>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [StGIT PATCH] Revert 'Disallow non-patch args to "stg show" (gna #8453).'
Date: Sun, 15 Jul 2007 23:32:11 +0200 [thread overview]
Message-ID: <20070715213211.6855.69618.stgit@gandelf.nowhere.earth> (raw)
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:
reply other threads:[~2007-07-15 21:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070715213211.6855.69618.stgit@gandelf.nowhere.earth \
--to=ydirson@altern.org \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox