From: Martin Liska Date: Mon, 28 Mar 2022 10:29:29 +0000 (+0200) Subject: gcc-changelog: Make This reverts stricter. X-Git-Tag: basepoints/gcc-13~469 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8464cf444e8f41f6c10cb75cfa899c838f8d506;p=thirdparty%2Fgcc.git gcc-changelog: Make This reverts stricter. contrib/ChangeLog: * gcc-changelog/git_commit.py: Make the parsing stricter. --- diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 95dc49e5d482..7e29934b4ad5 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -165,7 +165,7 @@ star_prefix_regex = re.compile(r'\t\*(?P\ *)(?P.*)') 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\w+).$') +revert_regex = re.compile(r'This reverts commit (?P[0-9a-f]+).$') cherry_pick_regex = re.compile(r'cherry picked from commit (?P\w+)') LINE_LIMIT = 100 @@ -317,7 +317,7 @@ class GitCommit: # 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