mirror of https://github.com/sharkdp/fd.git
feat: ignore `.git/` by default
This commit is contained in:
parent
fc240f7b2a
commit
3f9794cd1a
|
@ -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"))?;
|
||||
|
|
Loading…
Reference in New Issue