aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_commit.py
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-03-12 09:08:36 +0100
committerMartin Liska <mliska@suse.cz>2021-03-12 09:29:05 +0100
commita7ac3e92ecf251d5528eea4b46b5f42fd0168e43 (patch)
tree3264049111e29ecd94f5dc809a1bbc71c96b5c5a /contrib/gcc-changelog/git_commit.py
parent48ff383f0d9e917bcb7bcc091af413bcae07b440 (diff)
downloadgcc-a7ac3e92ecf251d5528eea4b46b5f42fd0168e43.zip
gcc-a7ac3e92ecf251d5528eea4b46b5f42fd0168e43.tar.gz
gcc-a7ac3e92ecf251d5528eea4b46b5f42fd0168e43.tar.bz2
gcc-changelog: allow ChangeLog deletion in a commit
contrib/ChangeLog: * gcc-changelog/git_commit.py: Allow deletion of ChangeLog files. * gcc-changelog/setup.cfg: Set line limit to 120 characters. * gcc-changelog/test_email.py: Add test. * gcc-changelog/test_patches.txt: Likewise. * gcc-changelog/git_email.py: Fix parsing of deleted files.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
-rwxr-xr-xcontrib/gcc-changelog/git_commit.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index e9dae0a..43fa7f4 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -314,8 +314,9 @@ class GitCommit:
if self.revert_commit:
self.info = self.commit_to_info_hook(self.revert_commit)
+ # Allow complete deletion of ChangeLog files in a commit
project_files = [f for f in self.info.modified_files
- if self.is_changelog_filename(f[0], allow_suffix=True)
+ if (self.is_changelog_filename(f[0], allow_suffix=True) and f[1] != 'D')
or f[0] in misc_files]
ignored_files = [f for f in self.info.modified_files
if self.in_ignored_location(f[0])]