Commit Graph
5 Commits
Author SHA1 Message Date
paseo-bot[bot]andClaude Opus 5.5 b5bd6b7704 Search only folders Git ignores, as deep as a pattern can reach, matching the source's case rule
Git lists untracked folders such as apps/ beside the ignored entries in
them; searching those walked apps/web/node_modules/. Search only folders
check-ignore reports, skip a folder at or below the depth of a pattern
without **, strip a leading UTF-8 BOM from .worktreeinclude as git does,
and match with the source repo's core.ignoreCase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:25:59 +00:00
paseo-bot[bot]andClaude Opus 5.5 cf193266f3 Keep worktree include matching literal and search only the path a pattern names
Prefix paths sent to check-ignore with ./ so a file named like pathspec
magic (`:(x`, `:!x`) no longer fails worktree creation, create the scratch
repo with an empty template so the user's template info/exclude adds no
patterns, and search a glob-free pattern's whole path instead of its
parent folder, so `node_modules/.cache` no longer walks node_modules/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 17:46:12 +00:00
paseo-bot[bot] 66d8e43e66 Match worktree includes without writing scratch files and search only the folders patterns name
Match ignored entries with check-ignore --no-index instead of recreating
them on disk, search inside an ignored folder only as deep as the pattern
names it, copy each file once, and note in the docs that **/ patterns
search every ignored folder.
2026-11-17 17:25:32 +00:00
paseo-bot[bot]andmgranderath 0d39140dc5 Create worktrees in large repos without scanning every ignored file
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>
2026-11-17 16:55:37 +00:00
Mohamed BoudraandCarlos Precioso dee0d138e9 feat(worktrees): copy included local files before setup and agents (#8100)
* feat(worktrees): copy included local files before setup and agents

Keep local-file materialization in one built-in lifecycle hook so workspace setup and the first agent see the completed copy. Reuse the community plugin algorithm with the source checkout supplied by the worktree hook.

Co-authored-by: Carlos Precioso <github@precioso.design>

* test(plugins): make worktree lifecycle checks portable on Windows

Compare source checkout filesystem identity across Git and Windows path spellings. Exercise copy rollback with a destination file blocking a directory, since Git for Windows accepts directories as exclude files.

---------

Co-authored-by: Carlos Precioso <github@precioso.design>
2026-10-28 17:21:01 +07:00