diff options
author | Martin Liska <mliska@suse.cz> | 2022-03-28 12:29:29 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-03-28 12:29:29 +0200 |
commit | c8464cf444e8f41f6c10cb75cfa899c838f8d506 (patch) | |
tree | 63aadd347f642e484fd63bbe2c60080dda92d0f7 | |
parent | bc86a86a4f2c057bc0e0be94dcbb8c128ae7f717 (diff) | |
download | gcc-c8464cf444e8f41f6c10cb75cfa899c838f8d506.zip gcc-c8464cf444e8f41f6c10cb75cfa899c838f8d506.tar.gz gcc-c8464cf444e8f41f6c10cb75cfa899c838f8d506.tar.bz2 |
gcc-changelog: Make This reverts stricter.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Make the parsing stricter.
-rwxr-xr-x | contrib/gcc-changelog/git_commit.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 95dc49e..7e29934 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<spaces>\ *)(?P<content>.*)') 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 @@ -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 |