diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dfe1f5..7a88201 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,8 @@ Bug fixes: [BUG #2747](https://github.com/BurntSushi/ripgrep/issues/2747), [BUG #2778](https://github.com/BurntSushi/ripgrep/issues/2778), [BUG #2836](https://github.com/BurntSushi/ripgrep/issues/2836), - [BUG #2933](https://github.com/BurntSushi/ripgrep/pull/2933): + [BUG #2933](https://github.com/BurntSushi/ripgrep/pull/2933), + [BUG #3067](https://github.com/BurntSushi/ripgrep/pull/3067): Fix bug related to gitignores from parent directories. * [BUG #1332](https://github.com/BurntSushi/ripgrep/issues/1332), [BUG #3001](https://github.com/BurntSushi/ripgrep/issues/3001): diff --git a/tests/regression.rs b/tests/regression.rs index 7f9818f..83323cd 100644 --- a/tests/regression.rs +++ b/tests/regression.rs @@ -1459,7 +1459,6 @@ rgtest!(r2658_null_data_line_regexp, |dir: Dir, mut cmd: TestCommand| { rgtest!(r2944_incorrect_bytes_searched, |dir: Dir, mut cmd: TestCommand| { dir.create("haystack", "foo1\nfoo2\nfoo3\nfoo4\nfoo5\n"); let got = cmd.args(&["--stats", "-m2", "foo", "."]).stdout(); - println!("{got}"); assert!(got.contains("10 bytes searched\n")); }); @@ -1479,6 +1478,19 @@ rgtest!(r2990_trip_over_trailing_dot, |dir: Dir, _cmd: TestCommand| { eqnice!("asdf/foo\n", got); }); +// See: https://github.com/BurntSushi/ripgrep/issues/3067 +rgtest!(r3067_gitignore_error, |dir: Dir, mut cmd: TestCommand| { + dir.create(".git", ""); + dir.create(".gitignore", "foobar/debug"); + dir.create_dir("foobar/some/debug"); + dir.create_dir("foobar/debug"); + dir.create("foobar/some/debug/flag", "baz"); + dir.create("foobar/debug/flag2", "baz"); + + let got = cmd.arg("baz").stdout(); + eqnice!("foobar/some/debug/flag:baz\n", got); +}); + // See: https://github.com/BurntSushi/ripgrep/issues/3108 rgtest!(r3108_files_without_match_quiet_exit, |dir: Dir, _: TestCommand| { dir.create("yes-match", "abc");