AAndrew Gallantci: fix binary discovery
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
tests: fix tests for buffer size change Sadly, there were several tests that are coupled to the size of the buffer used by ripgrep. Making the tests agnostic to the size is difficult. And it's annoying to fix the tests. But we rarely change the buffer size, so ¯\_(ツ)_/¯. | 5 年前 | |
index: add some initial indexing scaffolding This gives us some room to actually start writing out some index operations. | 2 个月前 | |
cli: document that `-c/--count` can be inconsistent with `-l/--files-with-matches` This is unfortunate, but is a known bug that I don't think can be fixed without either making `-l/--files-with-matches` much slower or changing what "binary filtering" means by default. In this PR, we document this inconsistency since users may find it quite surprising. The actual work-around is to disable binary filtering with the `--binary` flag. We add a test confirming this behavior. Closes #3131 | 1 年前 | |
test: attempt to fix flaky time-reliant test Fixes #2794 | 11 个月前 | |
tests: re-tool integration tests This basically rewrites every integration test. We reduce the amount of magic involved here in terms of which arguments are being passed to ripgrep processes. To make up for the boiler plate saved by the magic, we make the Dir (formerly WorkDir) type a bit nicer to use, along with a new TestCommand that wraps a std::process::Command. In exchange, we get tests that are easier to read and write. We also run every test with the `--pcre2` flag to make sure that works, when PCRE2 is available. | 7 年前 | |
style: simplify string formatting Most of this code was written before this was supported by Rust. Closes #2912 | 1 年前 | |
style: rustfmt everything This is why I was so intent on clearing the PR queue. This will effectively invalidate all existing patches, so I wanted to start from a clean slate. We do make one little tweak: we put the default type definitions in their own file and tell rustfmt to keep its grubby mits off of it. We also sort it lexicographically and hopefully will enforce that from here on. | 6 年前 | |
ignore: add multi-root parent matcher regression tests Parent ignore matchers are cached by directory across search roots, but each root must keep its own absolute_base for path rewriting when applying parent .gitignore / .rgignore rules. Document that invariant and lock it in with unit and integration tests for the order-dependent multi-root bugs in #3376, #3419, and #3320. Closes #3320, Closes #3376, Ref #3419, Closes #3451 | 2 个月前 | |
printer: vimgrep now only prints one line It turns out that the vimgrep format really only wants one line per match, even when that match spans multiple lines. We continue to support the previous behavior (print all lines in a match) in the `grep-printer` crate. We add a new option to enable the "only print the first line" behavior, and unconditionally enable it in ripgrep. We can do that because the option has no effect in single-line mode, since, well, in that case matches are guaranteed to span one line anyway. Fixes #1866 | 5 年前 | |
ignore: support `GIT_CONFIG_GLOBAL` and `GIT_CONFIG_SYSTEM` for `core.excludesFile` `gitconfig_excludes_path()` resolves the global gitignore by reading `core.excludesFile` from `$HOME/.gitconfig` and `$XDG_CONFIG_HOME/git/config`, but git 2.32 (June 2021) introduced `GIT_CONFIG_GLOBAL` and `GIT_CONFIG_SYSTEM` environment variables that override these locations. The `ignore` crate doesn't check either of them, so users who point `GIT_CONFIG_GLOBAL` at a non-standard path (e.g. NixOS managing git config at `/etc/git/config`) have their global gitignore silently ignored by ripgrep while `git` itself respects it. This commit checks `GIT_CONFIG_GLOBAL` before the hardcoded paths, matching git's semantics where it replaces both `$HOME/.gitconfig` and the XDG config. It also adds system-level config (`GIT_CONFIG_SYSTEM`, falling back to `/etc/gitconfig`) as a lowest-priority source for `core.excludesFile`, which the crate previously didn't consult at all. Fixes #3275, Closes #3276 | 2 个月前 | |
flags: disable many flags when indexing is enabled The indexing feature will be born with a lot of restrictions on it in order to bootstrap and end-to-end working system. For example, getting the `--pre` flag (and similar) working correctly is somewhat of a hazard, since you'd need to specify the same transformation during both indexing and not. We disable pretty much any kind of filtering or transform related flags other than what the default provides. Again, we'll relax at least most of these in the future. But let's start here. | 2 个月前 | |
ci: fix binary discovery It looks like the location of executables is changing in Cargo's test runner, so use the blessed way of discovering an executable. That is, for ripgrep, consult the `CARGO_BIN_EXE_rg` environment variable. | 1 个月前 |