gcc-changelog: detect Co-Authored-By before ChangeLog entries
authorMartin Liska <mliska@suse.cz>
Fri, 14 May 2021 08:44:33 +0000 (10:44 +0200)
committerMartin Liska <mliska@suse.cz>
Fri, 14 May 2021 08:44:33 +0000 (10:44 +0200)
contrib/ChangeLog:

* gcc-changelog/git_commit.py: Support Co-Authored-By before
a first ChangeLog entry.

contrib/gcc-changelog/git_commit.py

index 8f9b266..4958ab9 100755 (executable)
@@ -409,7 +409,8 @@ class GitCommit:
                 continue
             if (changelog_regex.match(b) or self.find_changelog_location(b)
                     or star_prefix_regex.match(b) or pr_regex.match(b)
-                    or dr_regex.match(b) or author_line_regex.match(b)):
+                    or dr_regex.match(b) or author_line_regex.match(b)
+                    or b.lower().startswith(CO_AUTHORED_BY_PREFIX)):
                 self.changes = body[i:]
                 return
         if not all_are_ignored: