Skip to content

fix(rg): count unrestricted flags independently#1754

Open
chaliy wants to merge 1 commit into
mainfrom
2026-05-25-fix-rg-u-parsing-compatibility-bug
Open

fix(rg): count unrestricted flags independently#1754
chaliy wants to merge 1 commit into
mainfrom
2026-05-25-fix-rg-u-parsing-compatibility-bug

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 25, 2026

Motivation

  • Fix correctness regression where -u/--unrestricted advanced behavior by inspecting current no_ignore/hidden booleans, causing explicit --no-ignore/--hidden flags to incorrectly consume unrestricted levels and producing order-dependent semantics.

Description

  • Add a new unrestricted_level: u8 field to RgOptions and initialize it in RgOptions::parse so unrestricted usage is tracked independently of explicit flags.
  • Replace apply_unrestricted() logic to increment unrestricted_level and map levels 1 => no_ignore, 2 => hidden, >=3 => binary to match ripgrep semantics regardless of flag order.
  • Add two regression differential tests to rg test cases to cover --no-ignore -u and --hidden -uu so explicit flags do not advance unrestricted levels.
  • Commit message: fix(rg): count unrestricted flags independently.

Testing

  • Ran the focused test with cargo test -p bashkit rg::tests::rg_real_diff_unrestricted -- --nocapture, and the test completed successfully.

Codex Task

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

cloudflare-workers-and-pages Bot commented May 25, 2026

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 b8a67bf Commit Preview URL May 25 2026, 02:42 AM

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant