feat: ignore `.git/` by default

This commit is contained in:
skoriop 2023-10-15 11:11:53 +05:30
parent fc240f7b2a
commit 3f9794cd1a
1 changed files with 7 additions and 0 deletions

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"))?;