1
0
mirror of https://github.com/sharkdp/fd synced 2024-07-01 07:14:22 +00:00

feat: ignore .git/ by default

This commit is contained in:
skoriop 2023-10-15 11:11:53 +05:30
parent fc240f7b2a
commit 3f9794cd1a

View File

@ -66,6 +66,13 @@ pub fn scan(paths: &[PathBuf], patterns: Arc<Vec<Regex>>, config: Arc<Config>) -
.add(pattern)
.map_err(|e| anyhow!("Malformed exclude pattern: {}", e))?;
}
if config.read_vcsignore {
override_builder
.add("!.git")
.map_err(|e| anyhow!("Malformed default exclude pattern: {}", e))?;
}
let overrides = override_builder
.build()
.map_err(|_| anyhow!("Mismatch in exclude patterns"))?;