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

Re: Signing by StGIT broken

From
PRPavel Roskin <proski@gnu.org>
Date
Jan 12, 2008, 04:58 UTC
Message-ID
<1200113883.26841.18.camel@rd>
In-Reply-To
<20080110074252.GA18629@diana.vm.bytemark.co.uk>
On Thu, 2008-01-10 at 08:42 +0100, Karl Hasselström wrote:
Show 7 quoted lines
> On 2008-01-09 21:53:16 -0500, Pavel Roskin wrote:
> 
> > "stg edit --sign" is not working anymore. It was working in version
> > 0.14.
> 
> Thanks for the report and the detailed analysis. I'll write a test and
> fix it (but not quite immediately, so feel free to beat me to it).

The fix below appears to work (thus making it a self-signing patch :)) but with my modest Python experience it absolutely needs to be reviewed. I don't even know how to wrap the long line without making it look misleading.

No testsuite fixes, sorry.  But the existing testsuite passes.
Fix "stg edit --sign"
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 stgit/commands/edit.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/stgit/commands/edit.py b/stgit/commands/edit.py
index b9699d5..650d5a3 100644
--- a/stgit/commands/edit.py
+++ b/stgit/commands/edit.py
@@ -90,7 +90,10 @@ def __update_patch(pname, text, options):
     bottom = patch.get_bottom()
     top = patch.get_top()
 
-    message, author_name, author_email, author_date, diff = parse_patch(text)
+    if text:
+        message, author_name, author_email, author_date, diff = parse_patch(text)
+    else:
+        message = author_name = author_email = author_date = diff = None
 
     out.start('Updating patch "%s"' % pname)
 
-- 
Regards,
Pavel Roskin
Previous: Karl HasselströmNext: Karl Hasselström
Message 3 of 4 in “Signing by StGIT broken”
  1. Pavel RoskinJan 10, 2008
  2. Karl HasselströmJan 10, 2008
  3. Pavel RoskinJan 12, 2008
  4. Karl HasselströmJan 18, 2008

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.