Repository navigation
Keep positive glob filters on the index - #161
Merged
Merged
Conversation
Apply positive --glob and --iglob filters to the indexed corpus for content searches and file listings. Preserve filesystem override semantics with --no-index and document the distinction. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation, tests, and documentation consistently enforce the intended indexed-corpus filtering behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Keeps positive glob filters on compatible indexes while documenting indexed-versus-filesystem semantics.
Changes:
- Enables indexed glob filtering for content and file-list queries.
- Adds local/server coverage for glob behavior.
- Updates CLI and agent documentation.
| File | Description |
|---|---|
tgrep-cli/src/search.rs |
Removes positive-glob index bypasses. |
tgrep-cli/src/glob_filter.rs |
Removes obsolete include detection. |
tgrep-cli/src/main.rs |
Clarifies glob help text. |
tgrep-cli/tests/indexed_hidden.rs |
Tests indexed glob routing and results. |
README.md |
Documents indexed glob semantics. |
AGENTS.md |
Updates agent search guidance. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Positive globs such as
--glob '*.ts'currently force filesystem scans, defeating indexing for common agent queries. Keep positive--globand--iglobfilters on compatible local or server indexes for both content searches and--files.Behavior change: Indexed globs filter only the indexed corpus and do not reinclude ignored files. Use
--no-indexwhen ripgrep-style filesystem glob overrides are needed. Other bypass and fallback conditions remain unchanged.Update CLI help, README, and agent guidance to document the distinction.