]> git.sur5r.net Git - u-boot/blobdiff - tools/patman/commit.py
SPDX: Correct SPDX tags from recent xilinx merge
[u-boot] / tools / patman / commit.py
index 89cce7f88a297dd32e486cd3cd1a7a0ef7819332..2bf3a0ba5b924e5d454fb4aacfdda565687778ce 100644 (file)
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
 # Copyright (c) 2011 The Chromium OS Authors.
 #
-# SPDX-License-Identifier:     GPL-2.0+
-#
 
 import re
 
@@ -29,6 +28,7 @@ class Commit:
         self.tags = []
         self.changes = {}
         self.cc_list = []
+        self.signoff_set = set()
         self.notes = []
 
     def AddChange(self, version, info):
@@ -72,3 +72,16 @@ class Commit:
             cc_list:    List of aliases or email addresses
         """
         self.cc_list += cc_list
+
+    def CheckDuplicateSignoff(self, signoff):
+        """Check a list of signoffs we have send for this patch
+
+        Args:
+            signoff:    Signoff line
+        Returns:
+            True if this signoff is new, False if we have already seen it.
+        """
+        if signoff in self.signoff_set:
+          return False
+        self.signoff_set.add(signoff)
+        return True