aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_commit.py
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-04-12 13:16:22 +0200
committerMartin Liska <mliska@suse.cz>2021-04-12 13:16:50 +0200
commita694a02125f181afe2ae461dd8f35c6f5f54ad22 (patch)
treea3c665af2ca49dc4964eda4787dee2eea799b634 /contrib/gcc-changelog/git_commit.py
parent29046e02b84a16b6315d952d7f76c502d0d021c2 (diff)
downloadgcc-a694a02125f181afe2ae461dd8f35c6f5f54ad22.zip
gcc-a694a02125f181afe2ae461dd8f35c6f5f54ad22.tar.gz
gcc-a694a02125f181afe2ae461dd8f35c6f5f54ad22.tar.bz2
mklog: support long filenames
contrib/ChangeLog: * gcc-changelog/git_commit.py: Support long filenames in entries. * gcc-changelog/test_email.py: Test it. * gcc-changelog/test_patches.txt: Likewise.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
-rwxr-xr-xcontrib/gcc-changelog/git_commit.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index 43fa7f4..90e908e 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -415,8 +415,10 @@ class GitCommit:
if line != line.rstrip():
self.errors.append(Error('trailing whitespace', line))
if len(line.replace('\t', ' ' * TAB_WIDTH)) > LINE_LIMIT:
- self.errors.append(Error('line exceeds %d character limit'
- % LINE_LIMIT, line))
+ # support long filenames
+ if not line.startswith('\t* ') or not line.endswith(':'):
+ self.errors.append(Error('line exceeds %d character limit'
+ % LINE_LIMIT, line))
m = changelog_regex.match(line)
if m:
last_entry = ChangeLogEntry(m.group(1).rstrip('/'),