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

[StGit PATCH 5/5] Autosign imported patches

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Sep 16, 2009, 21:41 UTC
Message-ID
<20090916214115.6622.76531.stgit@toshiba-laptop>
In-Reply-To
<20090916214049.6622.44662.stgit@toshiba-laptop>

If stgit.autosign configuration is set, allow the automatic signing of the imported patches, similar to the 'new' command.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
 stgit/commands/imprt.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py
index de77635..0f78490 100644
--- a/stgit/commands/imprt.py
+++ b/stgit/commands/imprt.py
@@ -141,6 +141,10 @@ def __create_patch(filename, message, author_name, author_email,
     if options.authdate:
         author_date = options.authdate
 
+    sign_str = options.sign_str
+    if not options.sign_str:
+        sign_str = config.get('stgit.autosign')
+
     crt_series.new_patch(patch, message = message, can_edit = False,
                          author_name = author_name,
                          author_email = author_email,
@@ -164,8 +168,7 @@ def __create_patch(filename, message, author_name, author_email,
         crt_series.refresh_patch(edit = options.edit,
                                  show_patch = options.showdiff,
                                  author_date = author_date,
-                                 sign_str = options.sign_str,
-                                 backup = False)
+                                 sign_str = sign_str, backup = False)
         out.done()
 
 def __mkpatchname(name, suffix):
Previous: Catalin Marinas
Message 6 of 6 in “More UI clean-up”
  1. 0/5 More UI clean-upCatalin Marinas, Sep 16, 2009
  2. 1/5 Remove the 'fail_dump' argument to git.apply_patch()Catalin Marinas, Sep 16, 2009
  3. 2/5 Add the --reject option to foldCatalin Marinas, Sep 16, 2009
  4. 3/5 Do not create an empty patch if import failed without --rejectCatalin Marinas, Sep 16, 2009
  5. 4/5 Add the -p option to foldCatalin Marinas, Sep 16, 2009
  6. 5/5 Autosign imported patchesCatalin Marinas, Sep 16, 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.