mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-01 04:32:01 -07:00
cli: add --no-ignore-exclude flag
This commit adds a new --no-ignore-exclude flag that permits disabling the use of .git/info/exclude filtering. Local exclusions are manual configurations to a repository and are not shared, so it is sometimes useful to disable to get a consistent view of a repository. This also adds a new section to the man page that describes automatic filtering. Closes #1420
This commit is contained in:
committed by
Andrew Gallant
parent
804b43ecd8
commit
297b428c8c
@@ -728,6 +728,18 @@ rgtest!(f1207_ignore_encoding, |dir: Dir, mut cmd: TestCommand| {
|
||||
eqnice!("\u{FFFD}\u{FFFD}\x00b\n", cmd.stdout());
|
||||
});
|
||||
|
||||
// See: https://github.com/BurntSushi/ripgrep/pull/1420
|
||||
rgtest!(f1420_no_ignore_dot, |dir: Dir, mut cmd: TestCommand| {
|
||||
dir.create_dir(".git/info");
|
||||
dir.create(".git/info/exclude", "foo");
|
||||
dir.create("bar", "");
|
||||
dir.create("foo", "");
|
||||
|
||||
cmd.arg("--sort").arg("path").arg("--files");
|
||||
eqnice!("bar\n", cmd.stdout());
|
||||
eqnice!("bar\nfoo\n", cmd.arg("--no-ignore-exclude").stdout());
|
||||
});
|
||||
|
||||
rgtest!(no_context_sep, |dir: Dir, mut cmd: TestCommand| {
|
||||
dir.create("test", "foo\nctx\nbar\nctx\nfoo\nctx");
|
||||
cmd.args(&[
|
||||
|
Reference in New Issue
Block a user