Always honor git ignore files (#13119)

This commit is contained in:
Jordan Pittman 2024-03-06 18:24:34 -05:00 • committed by GitHub
parent 722f436956
commit e2dcbad153
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -293,6 +293,7 @@ fn resolve_files(root: &Path) -> (Vec<PathBuf>, Vec<PathBuf>) {
pub fn resolve_allowed_paths(root: &Path) -> impl Iterator<Item = DirEntry> {
WalkBuilder::new(root)
.hidden(false)
.require_git(false)
.filter_entry(|entry| match entry.file_type() {
Some(file_type) if file_type.is_dir() => match entry.file_name().to_str() {
Some(dir) => !IGNORED_CONTENT_DIRS.contains(&dir),