[STGIT][PATCH] new: translate non word characters in patch name to '-'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---

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:
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux