mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-19 23:05:21 +00:00
worktree-include listed candidates with `git ls-files --others --ignored --exclude-from=.worktreeinclude`. With only the include patterns as excludes, git does not treat node_modules/ and other ignored folders as ignored, so it walks every file in them. On a large repo the walk outlasts the 30 s plugin hook limit and worktree creation fails and rolls back. List ignored entries with --exclude-standard --directory instead, so an ignored folder is one entry, match those entries against .worktreeinclude in a scratch repository, and search inside an ignored folder only when a pattern matches it or names a path inside it. A bare name such as `.env` no longer finds `node_modules/pkg/.env`; the docs say how to name such a path. Closes #10004 Co-authored-by: mgranderath <22001111+mgranderath@users.noreply.github.com>