mirror of
https://github.com/sharkdp/fd
synced 2024-09-30 04:55:28 +00:00
Merge pull request #1396 from skoriop/default-ignore-git-folder
feat: ignore `.git/` by default
This commit is contained in:
commit
3ed4ea7538
|
@ -1,5 +1,8 @@
|
|||
# v8.7.1
|
||||
|
||||
- Breaking: `.git/` is now ignored by default when using `--hidden` / `-H`, use `--no-ignore` / `-I` or
|
||||
`--no-ignore-vcs` to override, see #1387 and #1396 (@skoriop)
|
||||
|
||||
## Bugfixes
|
||||
|
||||
- `-1` properly conflicts with the exec family of options.
|
||||
|
|
|
@ -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")
|
||||
.expect("Invalid exclude pattern");
|
||||
}
|
||||
|
||||
let overrides = override_builder
|
||||
.build()
|
||||
.map_err(|_| anyhow!("Mismatch in exclude patterns"))?;
|
||||
|
|
Loading…
Reference in a new issue