mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-25 17:21:57 -07:00
ripgrep: add --ignore-file-case-insensitive
The --ignore-file-case-insensitive flag causes all .gitignore/.rgignore/.ignore files to have their globs matched without regard for case. Because this introduces a potentially significant performance regression, this is always disabled by default. Users that need case insensitive matching can enable it on a case by case basis. Closes #1164, Closes #1170
This commit is contained in:
committed by
Andrew Gallant
parent
7cbc535d70
commit
718a00f6f2
@@ -568,3 +568,16 @@ rgtest!(r1064, |dir: Dir, mut cmd: TestCommand| {
|
||||
dir.create("input", "abc");
|
||||
eqnice!("input:abc\n", cmd.arg("a(.*c)").stdout());
|
||||
});
|
||||
|
||||
// See: https://github.com/BurntSushi/ripgrep/issues/1164
|
||||
rgtest!(r1164, |dir: Dir, mut cmd: TestCommand| {
|
||||
dir.create_dir(".git");
|
||||
dir.create(".gitignore", "myfile");
|
||||
dir.create("MYFILE", "test");
|
||||
|
||||
cmd.arg("--ignore-file-case-insensitive").arg("test").assert_err();
|
||||
eqnice!(
|
||||
"MYFILE:test\n",
|
||||
cmd.arg("--no-ignore-file-case-insensitive").stdout()
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user