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

[StGIT PATCH 2/2] Have mail take the default for --prefix from stgit.mail.prefix.

From
Yann Dirson <ydirson@altern.org>
Date
Jun 9, 2007, 17:25 UTC
Message-ID
<20070609172526.30912.56153.stgit@gandelf.nowhere.earth>
In-Reply-To
<20070609172520.30912.80799.stgit@gandelf.nowhere.earth>

It is more convenient to set the prefix once and for all in the config file than each time on command line. ---

 stgit/commands/mail.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py
index cec1828..899cb1a 100644
--- a/stgit/commands/mail.py
+++ b/stgit/commands/mail.py
@@ -296,7 +296,11 @@ def __build_cover(tmpl, total_nr, msg_id, options):
     if options.prefix:
         prefix_str = options.prefix + ' '
     else:
-        prefix_str = ''
+        confprefix = config.get('stgit.mail.prefix')
+        if confprefix:
+            prefix_str = confprefix + ' '
+        else:
+            prefix_str = ''
         
     total_nr_str = str(total_nr)
     patch_nr_str = '0'.zfill(len(total_nr_str))
@@ -374,7 +378,11 @@ def __build_message(tmpl, patch, patch_nr, total_nr, msg_id, ref_id, options):
     if options.prefix:
         prefix_str = options.prefix + ' '
     else:
-        prefix_str = ''
+        confprefix = config.get('stgit.mail.prefix')
+        if confprefix:
+            prefix_str = confprefix + ' '
+        else:
+            prefix_str = ''
         
     if options.diff_opts:
         diff_flags = options.diff_opts.split()
Previous: Yann Dirson
Message 2 of 2 in “Have series show empty hidden patches as hidden rather than empty.”
  1. 1/2 Have series show empty hidden patches as hidden rather than empty.Yann Dirson, Jun 9, 2007
  2. 2/2 Have mail take the default for --prefix from stgit.mail.prefix.Yann Dirson, Jun 9, 2007

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.