aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2020-12-27 18:19:53 +0100
committerAndersBroman <a.broman58@gmail.com>2020-12-30 13:40:01 +0000
commitbf81d7c16ade0fd5c62cfc1bd4947983e43dc715 (patch)
treea708754e0da415ec15cd56b36f70a0b30afc0a15 /tools
parent19a048157d9a595feb31dc13e9a449f39d6d3d59 (diff)
tools: skip deleted files in check_typed_item_calls.
Ref: #17114.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check_typed_item_calls.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/check_typed_item_calls.py b/tools/check_typed_item_calls.py
index 43984f228a..0833f186ec 100755
--- a/tools/check_typed_item_calls.py
+++ b/tools/check_typed_item_calls.py
@@ -467,20 +467,20 @@ if args.file:
files.append(args.file)
elif args.commits:
# Get files affected by specified number of commits.
- command = ['git', 'diff', '--name-only', 'HEAD~' + args.commits]
+ command = ['git', 'diff', '--name-only', '--diff-filter=d', 'HEAD~' + args.commits]
files = [f.decode('utf-8')
for f in subprocess.check_output(command).splitlines()]
# Will examine dissector files only
files = list(filter(lambda f : is_dissector_file(f), files))
elif args.open:
# Unstaged changes.
- command = ['git', 'diff', '--name-only']
+ command = ['git', 'diff', '--name-only', '--diff-filter=d']
files = [f.decode('utf-8')
for f in subprocess.check_output(command).splitlines()]
# Only interested in dissector files.
files = list(filter(lambda f : is_dissector_file(f), files))
# Staged changes.
- command = ['git', 'diff', '--staged', '--name-only']
+ command = ['git', 'diff', '--staged', '--name-only', '--diff-filter=d']
files_staged = [f.decode('utf-8')
for f in subprocess.check_output(command).splitlines()]
# Only interested in dissector files.