]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc-changelog: do not allow space in long line
authorMartin Liska <mliska@suse.cz>
Mon, 12 Apr 2021 12:11:27 +0000 (14:11 +0200)
committerMartin Liska <mliska@suse.cz>
Mon, 12 Apr 2021 12:11:27 +0000 (14:11 +0200)
contrib/ChangeLog:

* gcc-changelog/git_commit.py: Do not allow space in long lines.

contrib/gcc-changelog/git_commit.py

index 90e908e375c64219b87b68454577f68ed4c517e3..b28f7deac230dda5da91af6515fae56386429afc 100755 (executable)
@@ -416,7 +416,7 @@ class GitCommit:
                 self.errors.append(Error('trailing whitespace', line))
             if len(line.replace('\t', ' ' * TAB_WIDTH)) > LINE_LIMIT:
                 # support long filenames
-                if not line.startswith('\t* ') or not line.endswith(':'):
+                if not line.startswith('\t* ') or not line.endswith(':') or ' ' in line[3:-1]:
                     self.errors.append(Error('line exceeds %d character limit'
                                              % LINE_LIMIT, line))
             m = changelog_regex.match(line)