Skip to content

Keep positive glob filters on the index - #161

Merged
Shengyu Fu (shengyfu) merged 2 commits into
mainfrom
shengyfu-tgrep-glob-behavior
Sep 18, 2026
Merged

Shengyu Fu (shengyfu) merged 2 commits into
mainfrom
shengyfu-tgrep-glob-behavior

Conversation

@shengyfu

Copy link
Copy Markdown
Member

Positive globs such as --glob '*.ts' currently force filesystem scans, defeating indexing for common agent queries. Keep positive --glob and --iglob filters 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-index when 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.

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]>
Copilot AI balanced review requested due to automatic review settings September 18, 2026 06:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI review requested due to automatic review settings September 18, 2026 06:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The routing change is consistently implemented, documented, and tested across local and server backends.

Review effort: Balanced
Findings: None

@shengyfu
Shengyu Fu (shengyfu) merged commit 239711c into main Sep 18, 2026
12 checks passed
@shengyfu
Shengyu Fu (shengyfu) deleted the shengyfu-tgrep-glob-behavior branch September 18, 2026 06:42
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.

2 participants