Skip to content

fix(rg): align -u ignore classes with --no-ignore#1751

Open
chaliy wants to merge 1 commit into
mainfrom
2026-05-25-fix-rg-ignore-class-toggles-in-u-flag
Open

fix(rg): align -u ignore classes with --no-ignore#1751
chaliy wants to merge 1 commit into
mainfrom
2026-05-25-fix-rg-ignore-class-toggles-in-u-flag

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 25, 2026

Motivation

  • Make -u/--unrestricted match --no-ignore semantics by disabling all per-class ignore toggles on the first -u so later positive flags only re-enable their intended classes.
  • Fix bug where -u --ignore-dot unintentionally left VCS/exclude/global/parent ignore classes enabled, causing incorrect ignore-file loading.

Description

  • Updated RgOptions::apply_unrestricted to set no_ignore_dot, no_ignore_exclude, no_ignore_global, no_ignore_parent, and no_ignore_vcs when no_ignore is first set.
  • Added a differential test case unrestricted and ignore-dot only restores dot ignores to prevent regressions in partial re-enable behavior.
  • Modified file: crates/bashkit/src/builtins/rg/mod.rs.

Testing

  • Ran cargo test -p bashkit builtins::rg::tests -- --nocapture and the test run exercised the rg suite; the new/related rg tests passed while one unrelated existing differential test (diff_rg_matches_real_rg_cases) failed due to a timing-line mismatch.
  • The added differential case for -u --ignore-dot executed and matched the expected output in the test run.

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 58c8fe9 Commit Preview URL May 25 2026, 02:38 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