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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



    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@xxxxxxxxxx>
--

måndag 12 mars 2007 17:25 skrev Catalin Marinas:
> On 09/03/07, Robin Rosenberg <robin.rosenberg@xxxxxxxxxx> 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()
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]