Skip to content

feat: add --exclude to skip paths relative to the root - #6

Closed
Felgar wants to merge 2 commits into
ThinkyMiner:mainfrom
Felgar:feat/exclude-paths
Closed

Felgar wants to merge 2 commits into
ThinkyMiner:mainfrom
Felgar:feat/exclude-paths

Conversation

@Felgar

@Felgar Felgar commented Oct 4, 2026

Copy link
Copy Markdown

Summary

SKIP_DIRS only matches directory names, so a repository cannot leave out a
vendored tree, generated code or nested git worktrees. On a repo with a
worktree under .claude/worktrees/ and a vendored minified .js, the first
start took 105 s and the MCP client timed out before the graph was saved.
With --exclude the same cold start takes 22 s.

Changes

  • --exclude PATH, repeatable, relative to the root, matched as a path prefix
  • applied to the file walk and to cached entries
  • an --exclude value that cannot match (outside the root, or with ..) is an error
  • README: one paragraph under Editor Setup; --exclude scopes the index, git_history still reports every tracked file

Test plan

  • Ran pytest — all tests pass
  • Added new tests for changed behavior
  • Tested with a real MCP client (if applicable)

Related issues

None.

Felgar added 2 commits October 4, 2026 11:39
SKIP_DIRS only matches directory names, so a repo has no way to leave out
a vendored tree, generated code or nested git worktrees. --exclude is
repeatable and takes a path relative to the root; it applies to the file
walk and to cached entries, and the graph drops files that are no longer
indexed.
An absolute path outside the root or a path with '..' excluded nothing,
silently. An absolute path under the root is now made relative; the others
raise. The README says --exclude scopes the index, not git_history.
@Felgar

Felgar commented Nov 15, 2026

Copy link
Copy Markdown
Author

Superseded by #7, rebased onto git-based discovery and background indexing.

@Felgar Felgar closed this Nov 15, 2026
@Felgar
Felgar deleted the feat/exclude-paths branch November 15, 2026 16:53
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