Skip to content

perf(fmt): avoid relative resolution in gitignore matching - #201

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-gitignore-root-prefix
Aug 5, 2026
Merged

perf(fmt): avoid relative resolution in gitignore matching#201
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-gitignore-root-prefix

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

GitIgnoreMatcher currently calls path.relative for every traversed path even though nearly all paths are normalized descendants of the Git root. This precomputes the root prefix and slices matching paths directly, while preserving the existing behavior for the root and paths outside it.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1e31597
Status: ✅  Deploy successful!
Preview URL: https://85fb8893.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-perf-fmt-gitignor.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit d08c2a3 into main Aug 5, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/perf-fmt-gitignore-root-prefix branch August 5, 2026 11: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.

1 participant