Skip to content

fix(rg): match output mode precedence#1759

Merged
chaliy merged 1 commit into
mainfrom
2026-05-24-rg-next-large-parity
May 25, 2026
Merged

fix(rg): match output mode precedence#1759
chaliy merged 1 commit into
mainfrom
2026-05-24-rg-next-large-parity

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 25, 2026

What

Fix rg output-mode precedence and add real-rg differential coverage.

Why

Real rg treats output mode flags as last-one-wins across count modes, file listing modes, JSON, and --files. Bashkit kept multiple booleans enabled, which produced wrong output for mixed flag orderings.

How

  • Centralize rg output-mode setters so each mode clears conflicting modes.
  • Apply the same precedence to -c, --count-matches, -l, --files-without-match, --json, and --files.
  • Add data-driven differential cases against real rg for mixed-order output flags.

Risk

  • Low
  • Limited to rg option parsing/output mode selection.

Checklist

  • Tests added or updated
  • Backward compatibility considered

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 6c8513e Commit Preview URL May 25 2026, 03:05 AM

@chaliy chaliy merged commit 29ab5fd into main May 25, 2026
34 checks passed
@chaliy chaliy deleted the 2026-05-24-rg-next-large-parity branch May 25, 2026 03:26
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.

1 participant