aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_commit.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
-rwxr-xr-xcontrib/gcc-changelog/git_commit.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index 57fba75..0c43816 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -16,6 +16,7 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>. */
+import difflib
import os
import re
@@ -576,6 +577,9 @@ class GitCommit:
changed_files = set(cand)
for file in sorted(mentioned_files - changed_files):
msg = 'unchanged file mentioned in a ChangeLog'
+ candidates = difflib.get_close_matches(file, changed_files, 1)
+ if candidates:
+ msg += f' (did you mean "{candidates[0]}"?)'
self.errors.append(Error(msg, file))
for file in sorted(changed_files - mentioned_files):
if not self.in_ignored_location(file):