[PR #9220] fix: stop rg after file limit #13031

Open
opened 2026-02-16 18:17:54 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9220

State: open
Merged: No


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.
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9220 **State:** open **Merged:** No --- ### 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.
yindo added the pull-request label 2026-02-16 18:17:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13031