Skip to content

Skip filesystem pattern loading when root is empty#8

Merged
andrew merged 1 commit into
mainfrom
fix-new-empty-root
Apr 3, 2026
Merged

Skip filesystem pattern loading when root is empty#8
andrew merged 1 commit into
mainfrom
fix-new-empty-root

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented Apr 3, 2026

New("") previously resolved "" as CWD and loaded .gitignore, .git/info/exclude, and global excludes, silently contaminating matchers intended for programmatic-only use.

Now New("") returns an empty Matcher immediately. AddPatterns and AddFromFile still work as before.

Fixes #7

New("") previously resolved "" as CWD and loaded .gitignore,
.git/info/exclude, and global excludes, silently contaminating
matchers intended for programmatic-only use.

Fixes #7
@andrew andrew merged commit 417995e into main Apr 3, 2026
4 checks passed
@andrew andrew deleted the fix-new-empty-root branch May 19, 2026 12:16
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.

New("") silently loads .gitignore from CWD — unexpected for programmatic-only usage

1 participant