git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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:
Next: Karl Hasselström
Message 1 of 7 in “new: translate non word characters in patch name to '-'”
  1. Hannes EderDec 27, 2008
  2. Karl HasselströmDec 28, 2008
  3. Hannes EderDec 29, 2008
  4. Karl HasselströmDec 29, 2008
  5. Hannes EderDec 31, 2008
  6. Karl HasselströmDec 31, 2008
  7. David KågedalJan 15, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.