mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
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>
This commit is contained in:
parent
13b98d95ba
commit
0d57718775
1 changed files with 8 additions and 0 deletions
|
@ -112,6 +112,14 @@ class PatchStream:
|
||||||
if self.commit and self.is_log:
|
if self.commit and self.is_log:
|
||||||
self.series.AddCommit(self.commit)
|
self.series.AddCommit(self.commit)
|
||||||
self.commit = None
|
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):
|
def ProcessLine(self, line):
|
||||||
"""Process a single line of a patch file or commit log
|
"""Process a single line of a patch file or commit log
|
||||||
|
|
Loading…
Reference in a new issue