git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [STGIT][PATCH] new: translate non word characters in patch name to '-'
@ 2008-12-27 12:37 Hannes Eder
  2008-12-28 20:49 ` Karl Hasselström
  0 siblings, 1 reply; 7+ messages in thread
From: Hannes Eder @ 2008-12-27 12:37 UTC (permalink / raw)
  To: git

This allows following usage:

$ stg new full/path/file-fix-foobar
Now at patch "full-path-file-fix-foobar"

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
---

I ran into as a '/' in a patch messed up stgit.

I find this useful as 'stg uncommit' does the same translation.

 stgit/commands/new.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stgit/commands/new.py b/stgit/commands/new.py
index 151cfe9..ab09476 100644
--- a/stgit/commands/new.py
+++ b/stgit/commands/new.py
@@ -58,7 +58,7 @@ def func(parser, options, args):
     if len(args) == 0:
         name = None
     elif len(args) == 1:
-        name = args[0]
+        name = utils.patch_name_from_msg(args[0])
         if stack.patches.exists(name):
             raise common.CmdException('%s: patch already exists' % name)
     else:

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-01-15 14:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-27 12:37 [STGIT][PATCH] new: translate non word characters in patch name to '-' Hannes Eder
2008-12-28 20:49 ` Karl Hasselström
2008-12-29 20:15   ` Hannes Eder
2008-12-29 21:21     ` Karl Hasselström
2008-12-31  8:07       ` Hannes Eder
2008-12-31 10:38         ` Karl Hasselström
2009-01-15 14:53     ` David Kågedal

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).