Commit b5894a1
Address CodeRabbit review: Fix path matching bug in resolveIgnorePattern
Fixed critical bug where absolutePattern.startsWith(cwd) could incorrectly
match sibling directories with similar prefixes (e.g., '/project' matching
'/projectdata').
Replaced string prefix check with path.relative() for proper path comparison.
Now correctly checks if a path is under cwd by verifying the relative path
doesn't start with '..'.
All existing tests pass (82 tests total).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 266cb95 commit b5894a1
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
0 commit comments