diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2016-06-26 23:24:30 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-07-11 14:06:44 -0600 |
commit | 0d57718775243c2d2d7ff8c69dad83db08e1030d (patch) | |
tree | 94262a1c58aa11008b49ac70b3ef0032b90fc621 /tools/patman | |
parent | 13b98d95bab89bcac75c8a187577e7cc3754d194 (diff) |
tools: patman: Generate cover letter correctly when 'END' is missing
If 'END' is missing in a 'Cover-letter' section, and that section
happens to show up at the very end of the commit message, and the
commit is the last commit of the series, patman fails to generate
cover letter for us. Handle this in CloseCommit of patchstream.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman')
-rw-r--r-- | tools/patman/patchstream.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index ce8ffb86bf..9ae977f2df 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -112,6 +112,14 @@ class PatchStream: if self.commit and self.is_log: self.series.AddCommit(self.commit) self.commit = None + # If 'END' is missing in a 'Cover-letter' section, and that section + # happens to show up at the very end of the commit message, this is + # the chance for us to fix it up. + if self.in_section == 'cover' and self.is_log: + self.series.cover = self.section + self.in_section = None + self.skip_blank = True + self.section = [] def ProcessLine(self, line): """Process a single line of a patch file or commit log |