Skip to content

feat(rg): honor global git ignore files#1685

Merged
chaliy merged 1 commit into
mainfrom
2026-05-22-rg-batch-11
May 22, 2026
Merged

feat(rg): honor global git ignore files#1685
chaliy merged 1 commit into
mainfrom
2026-05-22-rg-batch-11

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 22, 2026

What

Adds rg support for global git ignore discovery during recursive searches.

Why

Real rg applies global git ignore rules from core.excludesFile or the default git ignore file for recursive roots in git repositories, and --no-ignore-global disables that behavior. Bashkit accepted those flags but did not model the behavior.

How

  • Loads core.excludesFile from $HOME/.gitconfig, falling back to $XDG_CONFIG_HOME/git/ignore or $HOME/.config/git/ignore when no configured excludes file exists.
  • Applies global ignore rules per recursive root only when the root is in a git repo, unless --no-require-git is set.
  • Keeps explicit file searches unaffected, matching real rg ignore behavior.
  • Adds env-aware data-driven differential cases against real rg plus unit coverage.

Risk

  • Low / Medium
  • Recursive rg output changes when the virtual environment contains HOME/XDG global git ignore files; explicit file paths still bypass ignore filtering.

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 1fbcb8d Commit Preview URL May 22 2026, 06:23 PM

@chaliy chaliy merged commit 04620a5 into main May 22, 2026
34 checks passed
@chaliy chaliy deleted the 2026-05-22-rg-batch-11 branch May 22, 2026 18:36
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