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

Re: Signing by StGIT broken

From
Karl Hasselström <kha@treskal.com>
Date
Jan 18, 2008, 03:51 UTC
Message-ID
<20080118035153.GA12149@diana.vm.bytemark.co.uk>
In-Reply-To
<1200113883.26841.18.camel@rd>
On 2008-01-11 23:58:03 -0500, Pavel Roskin wrote:
Show 15 quoted lines
> On Thu, 2008-01-10 at 08:42 +0100, Karl Hasselström wrote:
>
> > 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.

It works by virtue of avoiding passing None to parse_patch(), which expects a string object. So the fix is correct.

There are two ways to do line breaking in Python:
  1. Break the line between a pair of parentheses. That way, the
     parser knows that the line can't possibly end here:
       foo(1, 2, 3,
           4, 5, 6)
       x = { 'foo': 5,
             'bar': 17 }
  2. As a last resort, you can end a line with backslash:
       x = 1 + 2 + 3 \
           + 4 + 5 + 6
     But you should never use this. Insert a pair of otherwise
     redundant parentheses instead:
       x = (1 + 2 + 3
            + 4 + 5 + 6)
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Pavel Roskin
Message 4 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.