]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
badwords: exclude wordlist input file from search
authorViktor Szakats <commit@vsz.me>
Sun, 31 May 2026 20:47:54 +0000 (22:47 +0200)
committerViktor Szakats <commit@vsz.me>
Mon, 1 Jun 2026 13:07:17 +0000 (15:07 +0200)
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

index 09676bacd90612e1ece7b86ce1c17b9f0b21aaad..f833573af7c8339d09742846582d03aaebb7f8d0 100755 (executable)
@@ -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;