[STGIT][PATCH] new: translate non word characters in patch name to '-'
- From
Hannes Eder <hannes@hanneseder.net>
- Date
- Dec 27, 2008, 12:37 UTC
- Message-ID
- <49562413.0437560a.287d.5133@mx.google.com>
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: