Skip to content

[Replaced by #3] fix: handle exclude patterns for nested directories#1

Closed
Vader-7 wants to merge 1 commit into
ga1az:mainfrom
Vader-7:fix/nested-exclude-patterns
Closed

[Replaced by #3] fix: handle exclude patterns for nested directories#1
Vader-7 wants to merge 1 commit into
ga1az:mainfrom
Vader-7:fix/nested-exclude-patterns

Conversation

@Vader-7
Copy link
Copy Markdown
Contributor

@Vader-7 Vader-7 commented Apr 13, 2026

Replaced by #3

Directory exclude patterns like `.git/` and `node_modules/` now correctly
match at any depth in the path, not just as a prefix. For example,
`vendor/lib/.git/HEAD` is now properly excluded by the `.git/` pattern.

The fix checks if a simple (single-segment) directory pattern matches
any segment of the path, not just the beginning. Multi-segment patterns
like `a/b/` continue to work via prefix matching as before.

Also fixes a path segment boundary bug in GetRelativePath where
`/tmp` could incorrectly match `/tmp2` due to missing separator check.

Both fixes include test cases.

Made-with: Cursor
@Vader-7 Vader-7 closed this Apr 13, 2026
@Vader-7 Vader-7 changed the title fix: handle exclude patterns for nested directories [Replaced by #3] fix: handle exclude patterns for nested directories Apr 13, 2026
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