printer: fix handling of has_match for summary printer

Previously, `Quiet` mode in the summary printer always acted like
"print matching paths," except without the printing. This happened even
if we wanted to "print non-matching paths." Since this only afflicted
quiet mode, this had the effect of flipping the exit status when
`--files-without-match --quiet` was used.

Fixes #3108, Ref #3118
This commit is contained in:
Andrew Gallant
2025-08-19 20:51:43 -04:00
parent 859d54270e
commit 126bbeab8c
4 changed files with 81 additions and 18 deletions

View File

@@ -25,6 +25,8 @@ Bug fixes:
Fix a bug where the "bytes searched" in `--stats` output could be incorrect.
* [BUG #2990](https://github.com/BurntSushi/ripgrep/issues/2990):
Fix a bug where ripgrep would mishandle globs that ended with a `.`.
* [BUG #3108](https://github.com/BurntSushi/ripgrep/issues/3108):
Fix a bug where `-q --files-without-match` inverted the exit code.
Feature enhancements: