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
This commit is contained in:
Andrew Gallant
2025-09-22 17:02:01 -04:00
parent c1fc6a5eb8
commit 1b07c6616a
4 changed files with 56 additions and 0 deletions

View File

@@ -31,6 +31,8 @@ Bug fixes:
Preserve line terminators when using `-r/--replace` flag.
* [BUG #3108](https://github.com/BurntSushi/ripgrep/issues/3108):
Fix a bug where `-q --files-without-match` inverted the exit code.
* [BUG #3131](https://github.com/BurntSushi/ripgrep/issues/3131):
Document inconsistency between `-c/--count` and `--files-with-matches`.
* [BUG #3140](https://github.com/BurntSushi/ripgrep/issues/3140):
Ensure hyphens in flag names are escaped in the roff text for the man page.
* [BUG #3155](https://github.com/BurntSushi/ripgrep/issues/3155):