opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix: stop rg after file limit

Open ry2009 opened this issue 1 day ago • 2 comments

What does this PR do?

  • Stop ripgrep scans once the file limit is reached and kill the rg process.

    • Disable symlink follow + hidden scanning by default for glob/list (only enable when targeted).
    • Pass limit through the debug rg path.

    Fixes #5220

How did you verify your code works?

  • Manual: Bun script calling Ripgrep.files({ limit: 100 }) on /tmp/oc-rg-test (20k files + symlink loop); returns 100 quickly, no lingering rg processes.

ry2009 avatar Jan 18 '26 08:01 ry2009