From 4c3d068f942231dc905ea283e4f82bd70801c37c Mon Sep 17 00:00:00 2001 From: An Sung Date: Sat, 14 Sep 2024 16:04:59 -0700 Subject: [PATCH] Exclude deleted file from wpt lint (#48178) The current linter incorrectly flags capitalization changes in file names as case-insensitive duplicates. This change fixes the issue by filtering out deleted files from the git diff. --- tools/wpt/testfiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/wpt/testfiles.py b/tools/wpt/testfiles.py index e13b878cf2a607..5f4c92b3869da7 100644 --- a/tools/wpt/testfiles.py +++ b/tools/wpt/testfiles.py @@ -147,7 +147,7 @@ def repo_files_changed(revish: Text, include_uncommitted: bool = False, include_ # gives us that (via the merge-base) revish = revish.replace("..", "...") - files_list = git("diff", "--no-renames", "--name-only", "-z", revish).split("\0") + files_list = git("diff", "--no-renames", "--name-only", "--diff-filter=d", "-z", revish).split("\0") assert not files_list[-1], f"final item should be empty, got: {files_list[-1]!r}" files = set(files_list[:-1])