]> git.sur5r.net Git - u-boot/commitdiff
patman: Don't barf if the word 'commit' starts a line
authorDoug Anderson <dianders@chromium.org>
Fri, 1 Mar 2013 11:11:07 +0000 (11:11 +0000)
committerSimon Glass <sjg@chromium.org>
Mon, 8 Apr 2013 22:21:20 +0000 (15:21 -0700)
Patman's regular expression for detecting the start of a
commit in a git log was a little simplistic and could be
confused if the git log itself had the word "commit" as
the start of a line (as this commit does).  Make patman
a little more robust.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
tools/patman/patchstream.py

index 4fda852213a9b4aba78717752c850840702481f6..fc7492e95a84e79540228f0b1cce40d3491e4542 100644 (file)
@@ -52,7 +52,7 @@ re_series = re.compile('^Series-(\w*): *(.*)')
 re_tag = re.compile('^(Tested-by|Acked-by|Reviewed-by|Cc): (.*)')
 
 # The start of a new commit in the git log
-re_commit = re.compile('^commit (.*)')
+re_commit = re.compile('^commit ([0-9a-f]*)$')
 
 # We detect these since checkpatch doesn't always do it
 re_space_before_tab = re.compile('^[+].* \t')