diff options
author | Simon Glass <sjg@chromium.org> | 2014-04-20 10:50:14 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-05-09 14:50:45 -0600 |
commit | 102061bd8b0b174e1cf811dfd35641d8a9e4eba3 (patch) | |
tree | 71bbe7b7fc913eaca20f59e0c3e3376f2b6d7489 /tools/patman/commit.py | |
parent | 757f64a89ba5bb04661b3f43444ca57fa6db1132 (diff) | |
download | u-boot-102061bd8b0b174e1cf811dfd35641d8a9e4eba3.tar.gz u-boot-102061bd8b0b174e1cf811dfd35641d8a9e4eba3.tar.bz2 u-boot-102061bd8b0b174e1cf811dfd35641d8a9e4eba3.zip |
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 <sjg@chromium.org>
Diffstat (limited to 'tools/patman/commit.py')
-rw-r--r-- | tools/patman/commit.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/patman/commit.py b/tools/patman/commit.py index 89cce7f88a..3e0adb8f7e 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 |