diff options
author | Ilya Yanok <ilya.yanok@cogentembedded.com> | 2012-08-06 23:46:08 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-09-02 16:24:51 +0200 |
commit | c7379149ffa2c8ba2807dd2e3ff0847f256a982e (patch) | |
tree | ee28085ecc8d085041893d7a3c2dd642cc9b1f8b | |
parent | 73fe07a79a65600acce3d96c0b0d6ad1ca3e8551 (diff) | |
download | u-boot-imx-c7379149ffa2c8ba2807dd2e3ff0847f256a982e.zip u-boot-imx-c7379149ffa2c8ba2807dd2e3ff0847f256a982e.tar.gz u-boot-imx-c7379149ffa2c8ba2807dd2e3ff0847f256a982e.tar.bz2 |
patman: don't mess with signoffs
Currently patman assumes that there should be only one Signoff line
and this is obviously incorrect: we often have to work with patches
containing other people signoffs. Moreover, it's really desirable
to preserve the comments between signoffs.
So until some sophisticated signoff processing will be developed I
suggest just don't mess with signoffs at all and treat them like
plain text lines. The only drawback I've found so far is the case
where you have a patch with someones else signoff but not yours and
also have to patman tags under signoff line. In this case you will
get extra empty line between signoffs.
Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
-rw-r--r-- | tools/patman/patchstream.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index 3de32d5..0503bac 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -46,7 +46,7 @@ re_cover = re.compile('^Cover-letter:') re_series = re.compile('^Series-(\w*): *(.*)') # Commit tags that we want to collect and keep -re_tag = re.compile('^(Tested-by|Acked-by|Signed-off-by|Cc): (.*)') +re_tag = re.compile('^(Tested-by|Acked-by|Cc): (.*)') # The start of a new commit in the git log re_commit = re.compile('^commit (.*)') @@ -241,15 +241,8 @@ class PatchStream: # Detect tags in the commit message elif tag_match: - # Onlly allow a single signoff tag - if tag_match.group(1) == 'Signed-off-by': - if self.signoff: - self.warn.append('Patch has more than one Signed-off-by ' - 'tag') - self.signoff += [line] - # Remove Tested-by self, since few will take much notice - elif (tag_match.group(1) == 'Tested-by' and + if (tag_match.group(1) == 'Tested-by' and tag_match.group(2).find(os.getenv('USER') + '@') != -1): self.warn.append("Ignoring %s" % line) elif tag_match.group(1) == 'Cc': @@ -288,8 +281,6 @@ class PatchStream: # Output the tags (signeoff first), then change list out = [] - if self.signoff: - out += self.signoff log = self.series.MakeChangeLog(self.commit) out += self.FormatTags(self.tags) out += [line] + log |