mirror of
https://github.com/curl/curl.git
synced 2026-06-13 12:45:38 +03:00
checksrc-all.pl: do not check files multiple times
Restrict `git ls-files` to return `*.[ch]` files within `$dir` only.
Before this patch it returned files in subdirectories too, which did
double work and may have made `checksrc.pl` pick `.checksrc` from the
first such subdirectory, masking the one in `$dir`. (current curl tree
is not affected)
Ref: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec
Follow-up to 33f606cd51 #20439
Closes #21909
This commit is contained in:
parent
7de0a7e71a
commit
2dfd265d66
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ my $anyfailed = 0;
|
|||
for my $dir (@dirs) {
|
||||
if($is_git) {
|
||||
@files = ();
|
||||
open(O, '-|', 'git', 'ls-files', "$dir/*.[ch]") || die; push @files, <O>; close(O);
|
||||
open(O, '-|', 'git', 'ls-files', ":(glob)$dir/*.[ch]") || die; push @files, <O>; close(O);
|
||||
chomp(@files);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue