ignore: only stat .jj if we actually care

I was comparing the work being done by fd and find and noticed (with
`strace -f -c -S` calls) that fd was doing a ton of failed `statx`
calls. Upon closer inspection it was stating `.jj` even though I
was passing `--no-ignore`. Eventually I turned up this check in
`Ignore::add_child_path` that was doing stat on `.jj` regardless of
whether the options request it.

With this patch it'll only stat `.jj` if that's relevant to the query.

PR #3212
This commit is contained in:
Ian McKellar
2025-10-30 09:49:05 -07:00
committed by Andrew Gallant
parent 36b7597693
commit 85edf4c796
2 changed files with 10 additions and 4 deletions

View File

@@ -2,6 +2,11 @@ TBD
===
Unreleased changes. Release notes have not yet been written.
Bug fixes:
* [BUG #3212](https://github.com/BurntSushi/ripgrep/pull/3212):
Don't check for the existence of `.jj` when `--no-ignore` is used.
15.1.0
======