From 102061bd8b0b174e1cf811dfd35641d8a9e4eba3 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 20 Apr 2014 10:50:14 -0600 Subject: patman: Avoid duplicate sign-offs Keep track of all Signed-off-by tags in a commit and silently suppress any duplicates. Signed-off-by: Simon Glass --- tools/patman/commit.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tools/patman/commit.py') diff --git a/tools/patman/commit.py b/tools/patman/commit.py index 89cce7f..3e0adb8 100644 --- a/tools/patman/commit.py +++ b/tools/patman/commit.py @@ -29,6 +29,7 @@ class Commit: self.tags = [] self.changes = {} self.cc_list = [] + self.signoff_set = set() self.notes = [] def AddChange(self, version, info): @@ -72,3 +73,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 -- cgit v1.1