As discussed at
https://gcc.gnu.org/pipermail/gcc-patches/2020-December/561995.html ,
the ChangeLog checker does not correctly handle files with non-ASCII
file names.

This patch fixes the problem.  I have little experience with Python,
so I may have made some foolish mistakes here.

OK to commit?

Thanks.

Ian

* gcc-changelog/git_repository.py: Ignore quotation marks added by git
for non-ASCII file names.
diff --git a/contrib/gcc-changelog/git_repository.py 
b/contrib/gcc-changelog/git_repository.py
index 8edcff91ad6..86b470b0881 100755
--- a/contrib/gcc-changelog/git_repository.py
+++ b/contrib/gcc-changelog/git_repository.py
@@ -55,7 +55,10 @@ def parse_git_revisions(repo_path, revisions, strict=True):
                     t = 'A'
                 else:
                     t = 'M'
-                modified_files.append((file.b_path, t))
+                path = file.b_path
+                if path.startswith('"') and path.endswith('"'):
+                    path = path[1:len(path)-1]
+                modified_files.append((path, t))
 
             date = datetime.utcfromtimestamp(c.committed_date)
             author = '%s  <%s>' % (c.author.name, c.author.email)

Reply via email to