From 6ff5c8ac4a7e195fada7297906c72bc45c3cac4f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 31 May 2026 22:47:54 +0200 Subject: [PATCH] badwords: exclude wordlist input file from search To avoid hitting all lines in it. It doesn't happen in curl at the moment, but may happen in the future or in other projects using this script. Closes #21819 --- scripts/badwords | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/badwords b/scripts/badwords index 09676bacd9..f833573af7 100755 --- a/scripts/badwords +++ b/scripts/badwords @@ -318,7 +318,7 @@ sub file { } my @filemasks = @ARGV; -open(my $git_ls_files, '-|', 'git', 'ls-files', '--', @filemasks) or die "Failed running git ls-files: $!"; +open(my $git_ls_files, '-|', 'git', 'ls-files', '--', ":!:$file", @filemasks) or die "Failed running git ls-files: $!"; my @files; while(my $each = <$git_ls_files>) { chomp $each;