end_of_location_regex = re.compile(r'[\[<(:]')
item_empty_regex = re.compile(r'\t(\* \S+ )?\(\S+\):\s*$')
item_parenthesis_regex = re.compile(r'\t(\*|\(\S+\):)')
-revert_regex = re.compile(r'This reverts commit (?P<hash>\w+).$')
+revert_regex = re.compile(r'This reverts commit (?P<hash>[0-9a-f]+).$')
cherry_pick_regex = re.compile(r'cherry picked from commit (?P<hash>\w+)')
LINE_LIMIT = 100
# Identify first if the commit is a Revert commit
for line in self.info.lines:
- m = revert_regex.match(line)
+ m = revert_regex.fullmatch(line)
if m:
self.revert_commit = m.group('hash')
break