From: Pavel Roskin <proski@gnu.org>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: [PATCH] stg export: check if there are any patches to export
Date: Tue, 24 Jan 2006 16:25:41 -0500 [thread overview]
Message-ID: <1138137941.24415.33.camel@dv> (raw)
Otherwise, stg export fails with "list index out of range"
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
stgit/commands/export.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/stgit/commands/export.py b/stgit/commands/export.py
index 096fb68..b8ca133 100644
--- a/stgit/commands/export.py
+++ b/stgit/commands/export.py
@@ -124,6 +124,9 @@ def func(parser, options, args):
patches = applied[start_idx:stop_idx]
num = len(patches)
+ if num == 0:
+ raise CmdException, 'No patches applied'
+
zpadding = len(str(num))
if zpadding < 2:
zpadding = 2
--
Regards,
Pavel Roskin
reply other threads:[~2006-01-24 21:26 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=1138137941.24415.33.camel@dv \
--to=proski@gnu.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;
as well as URLs for NNTP newsgroup(s).