diff options
author | Naveen Nathan <naveen@lastninja.net> | 2019-11-07 11:23:57 +1100 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2020-02-17 17:16:28 -0500 |
commit | 297b428c8c92dca2c62d57dd41ad085aa94c4aa4 (patch) | |
tree | 37f99ed74be2ffdfeb35e096ac063a0bc813e7e4 /tests | |
parent | 804b43ecd8bd37fde4fc81f49d1f9bb659aeac1c (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/feature.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/feature.rs b/tests/feature.rs index 4d918163..33ab4e17 100644 --- a/tests/feature.rs +++ b/tests/feature.rs @@ -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(&[ |