Skip to content
Myr

Add --no-ignore-parent flag

Before adoption: this commit came in with the history the project adopted, so no landing records it.

- Flag toggles parent checking in the `ignore` crate. This should affect both git and non-git ignore files. - Updated Changelog.

authored by William Correia · committed by William Correia · parent b5344da · Browse files · 5 files+20 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+20 added−1 removed

  • other:+20 added−1 removed

5 files+20 added−1 removed

modified:src/app.rs+10 added
48 unmodified lines
49 ignored by '.gitignore' files.",50 ),51 )52 .arg(53 Arg::with_name("no-ignore-parent")54 .long("no-ignore-parent")55 .overrides_with("no-ignore-parent")56 .hidden_short_help(true)57 .long_help(58 "Show search results from files and directories that would otherwise be \59 ignored by '.gitignore', '.ignore', or '.fdignore' files in parent directories.",60 ),61 )62 .arg(63 Arg::with_name("no-global-ignore-file")64 .long("no-global-ignore-file")65 .hidden(true)66 .long_help("Do not respect the global ignore file."),
559 unmodified lines
modified:src/main.rs+4 added
336 unmodified lines
337 || matches.is_present("rg-alias-hidden-ignore")),338 read_vcsignore: !(matches.is_present("no-ignore")339 || matches.is_present("rg-alias-hidden-ignore")340 || matches.is_present("no-ignore-vcs")),341 read_parent_ignore: !(matches.is_present("no-ignore")342 || matches.is_present("rg-alias-hidden-ignore")343 || matches.is_present("no-ignore-vcs")344 || matches.is_present("no-ignore-parent")),345 read_global_ignore: !(matches.is_present("no-ignore")346 || matches.is_present("rg-alias-hidden-ignore")347 || matches.is_present("no-global-ignore-file")),348 follow_links: matches.is_present("follow"),
147 unmodified lines
modified:src/options.rs+3 added
22 unmodified lines
2324 /// Whether to respect `.fdignore` files or not.25 pub read_fdignore: bool,2627 /// Whether to respect ignore files in parent directories or not.28 pub read_parent_ignore: bool,2930 /// Whether to respect VCS ignore files (`.gitignore`, ..) or not.31 pub read_vcsignore: bool,3233 /// Whether to respect the global ignore file or not.
75 unmodified lines
modified:src/walk.rs+1 added-1 removed
66 unmodified lines
67 let mut walker = WalkBuilder::new(first_path_buf.as_path());68 walker69 .hidden(config.ignore_hidden)70 .ignore(config.read_fdignore)71 .parents(config.read_fdignore || config.read_vcsignore)71 .parents(config.read_parent_ignore)72 .git_ignore(config.read_vcsignore)73 .git_global(config.read_vcsignore)74 .git_exclude(config.read_vcsignore)75 .overrides(overrides)
438 unmodified lines
modified:CHANGELOG.md+2 added
1# Upcoming release23## Features45- Add new `--no-ignore-parent` flag, see #787 (@will459)67## Bugfixes89- Set default path separator to `/` in MSYS, see #537 and #730 (@aswild)10- fd cannot search files under a RAM disk, see #752
515 unmodified lines