diff options
author | Scott Wood <scottwood@freescale.com> | 2014-09-25 14:30:46 -0500 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-30 15:55:26 -0700 |
commit | 4b89b8135f4792c456fbffbf7eea8456c3472455 (patch) | |
tree | 195d4d462f70d21838feddf7e857f767d6a9bf79 /tools/patman | |
parent | 2181830f11c2bbfea31e5f3f957577a619fc3776 (diff) | |
download | u-boot-4b89b8135f4792c456fbffbf7eea8456c3472455.tar.gz u-boot-4b89b8135f4792c456fbffbf7eea8456c3472455.tar.bz2 u-boot-4b89b8135f4792c456fbffbf7eea8456c3472455.zip |
patman: Check commit_match before stripping leading whitespace
True commit lines start at column zero. Anything that is indented
is part of the commit message instead. I noticed this by trying to
run buildman with commit e3a4facdfc07179ebe017a07b8de6224a935a9f3
as master, which contained a reference to a Linux commit inside
the commit message. ProcessLine saw that as a genuite commit
line, and thus buildman tried to build it, and died with an
exception because that SHA is not present in the U-Boot tree.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman')
-rw-r--r-- | tools/patman/patchstream.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index da0488337b..8c3a0ec9ee 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -139,6 +139,9 @@ class PatchStream: # Initially we have no output. Prepare the input line string out = [] line = line.rstrip('\n') + + commit_match = re_commit.match(line) if self.is_log else None + if self.is_log: if line[:4] == ' ': line = line[4:] @@ -146,7 +149,6 @@ class PatchStream: # Handle state transition and skipping blank lines series_tag_match = re_series_tag.match(line) commit_tag_match = re_commit_tag.match(line) - commit_match = re_commit.match(line) if self.is_log else None cover_cc_match = re_cover_cc.match(line) signoff_match = re_signoff.match(line) tag_match = None |