diff options
author | Martin Liska <mliska@suse.cz> | 2020-12-21 10:35:11 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-12-21 10:35:11 +0100 |
commit | 1b021bbd85a79c9d16c1359cbc23b608685dfd9f (patch) | |
tree | 950a945106f0ae8babc89410e60dfae1a6141ee0 /contrib/gcc-changelog/git_commit.py | |
parent | 2ebe7526584ed81d70d004d4fd527ef86af367c3 (diff) | |
download | gcc-1b021bbd85a79c9d16c1359cbc23b608685dfd9f.zip gcc-1b021bbd85a79c9d16c1359cbc23b608685dfd9f.tar.gz gcc-1b021bbd85a79c9d16c1359cbc23b608685dfd9f.tar.bz2 |
gcc-changelog: new error for quoted utf8 filenames
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Add new error for quoted
filenames.
* gcc-changelog/test_email.py: Test it.
* gcc-changelog/test_patches.txt: Test it.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
-rwxr-xr-x | contrib/gcc-changelog/git_commit.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 01f4987..f9cb8cb 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -299,6 +299,14 @@ class GitCommit: 'separately from normal commits')) return + # check for an encoded utf-8 filename + hint = 'git config --global core.quotepath false' + for modified, _ in self.info.modified_files: + if modified.startswith('"') or modified.endswith('"'): + self.errors.append(Error('Quoted UTF8 filename, please set: ' + f'"{hint}"', modified)) + return + all_are_ignored = (len(project_files) + len(ignored_files) == len(self.info.modified_files)) self.parse_lines(all_are_ignored) |