Skip to content

fix: perf(ignore): don't search subdirs for git/ignore files if max depth is reached (#2565)#3353

Open
krapcys1-maker wants to merge 1 commit intoBurntSushi:masterfrom
krapcys1-maker:fix/issue-2565-20260406183630
Open

fix: perf(ignore): don't search subdirs for git/ignore files if max depth is reached (#2565)#3353
krapcys1-maker wants to merge 1 commit intoBurntSushi:masterfrom
krapcys1-maker:fix/issue-2565-20260406183630

Conversation

@krapcys1-maker
Copy link
Copy Markdown

Fixes #2565

Summary

Addresses #2565 in BurntSushi/ripgrep with a minimal, targeted change.

Problem

When searching for git/ignore files (the one set with .ignore .git_ignore .git_exclude), the crate should not search the sub-directories if its at the max depth

What changed

  • crates/ignore/src/walk.rs

Solution

Apply focused code changes in crates/ignore/src/walk.rs to remove the reported behavior from #2565.

Why

Before: users hit the behavior described in #2565. After: behavior should follow issue expectations while keeping changes minimal and auditable.

Tests

  • cargo check --workspace
  • cargo test -p grep-printer --lib -- --nocapture

Scope

  • Changed files (1): crates/ignore/src/walk.rs
  • Root-cause gate verdict: confirmed
  • Replay stability: not_run

Validation

  • Local validation gate verdict: confirmed (risk: low).
  • Passed check in 1.1s: cargo check --workspace
  • Passed check in 1.8s: cargo test -p grep-printer --lib -- --nocapture

Limitations

Deterministic multi-replay was not executed in this run (replay_stability_status=not_run).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(ignore): don't search subdirs for git/ignore files if max depth is reached

2 participants