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

Re: [StGit PATCH] Add an empty line before signed-off-by

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Mar 12, 2007, 21:13 UTC
Message-ID
<200703122213.21298.robin.rosenberg@dewire.com>
In-Reply-To
<b0943d9e0703120925k17fb9cabt6b43e371433dfc9b@mail.gmail.com>
    Default to the standard convention of having an empty line
    before the Signed-off line when addign a signature using the
    --sign option. 
    Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
--
måndag 12 mars 2007 17:25 skrev Catalin Marinas:
Show 8 quoted lines
> On 09/03/07, Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
> > Default to the standard convention of having an empty line
> > before the Signed-off line when addign a signature using the
> > --sign option.
> 
> I mainly use this option to counter-sign an existing patch, in which
> case there is no need for a new line. Maybe we need StGIT to be
> smarter and check whether the patch was already signed.
Ok, here's a smarter version
-- robin
diff --git a/stgit/stack.py b/stgit/stack.py
index feb77e3..681da5e 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -734,7 +734,12 @@ class Series(StgitObject):
             committer_email = patch.get_commemail()

         if sign_str:
-            descr = '%s\n%s: %s <%s>\n' % (descr.rstrip(), sign_str,
+            descr = descr.rstrip()
+            if descr.find("\nSigned-off-by") < 0:
+                if descr.find("\nAcked-by") < 0:
+                    descr = descr + "\n"
+
+            descr = '%s\n%s: %s <%s>\n' % (descr, sign_str,
                                            committer_name, committer_email)

         bottom = patch.get_bottom()
Previous: Catalin Marinas
Message 3 of 3 in “Add an empty line before signed-off-by”
  1. Add an empty line before signed-off-byRobin Rosenberg, Mar 9, 2007
  2. Catalin MarinasMar 12, 2007
  3. Robin RosenbergMar 12, 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.