Setting for where task worktrees are created (e.g. a sibling folder instead of .worktrees/ inside the repo)
维护者通常 4 天内回复
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- docker, electron, git, typescript
调研方向
Start in electron/ipc/git.ts at worktreePathFor, then trace how project settings are stored and how new task worktrees are created. Review coverage.ts, BranchPrefixField, and mergeTask for the stated .worktrees assumptions. Before implementation, resolve the scope questions about app-wide defaults, coordinator sub-tasks, and Arena and document-run worktrees; done means the setting is validated and new tasks use it while existing task paths remain intact.
由索引模型根据 Issue 内容生成。
描述
Problem
Task worktrees always go to <repo>/.worktrees/<branch> (worktreePathFor in electron/ipc/git.ts). The .git/info/exclude entry keeps them out of git status, but plenty of tools walk the directory tree without reading git's exclude file, so every task's files show up again in the main checkout:
- Jest's haste map crawls them, and the duplicate
package.jsonnames fail with "Haste module naming collision" tscwithout anincludecompiles every.tsfile under the project folder, worktrees includedeslint .lints them, since flat config only ignoresnode_modulesand.gitby defaultdocker build .sends them in the build context unless.dockerignorelists them- dev-server file watchers running in the main checkout watch every task's files too
A configurable location is a common ask upstream as well: anthropics/claude-code#27282 (sibling folder, 72 👍) and openai/codex#10599 (configurable root, 77 👍).
Proposal
An optional per-project "Worktree folder" setting next to the branch prefix. Empty keeps today's behavior, so nothing changes unless you set it.
- New tasks go to
<folder>/<branch>. Existing tasks keep their savedworktreePath, and merge and delete already use it. - Stored in app state with the other project settings, not in a repo file (same reasoning as #231).
- Validated in the main process: absolute after
~expansion, not the repo root, not inside.git, created if missing. A folder inside the repo gets its own.git/info/excludeentry, the way.worktrees/does now. - Regular Docker tasks only mount the worktree itself, so they aren't affected by where it lives. The parent-folder mount (
dockerMountWorktreeParent) is only set for Docker coordinator tasks and the tasks they coordinate. - I'd also fix the few places that assume
.worktrees: the repo-name guess incoverage.ts, the path preview inBranchPrefixField, and the fallback path inmergeTask.
Questions before I start
- Per-project only, or also an app-wide default in Settings (e.g.
~/worktrees/{project})? - MCP coordinator sub-tasks are created in the main process with a hardcoded
taskprefix, so they already ignore project settings. Leave them in.worktrees/, or pass the folder through coordinator registration? This matters for Docker too: a Docker coordinator whose own worktree is in a custom folder wouldn't have its.worktrees/task/sub-tasks in that parent-folder mount. - Arena and document-run worktrees: keep them in
.worktrees/?
Happy to send a PR if this direction works for you.
- 主要语言
- TypeScript
- 星标
- 1k
- 派生
- 144
- 平均合并
- 4 天 19 小时
- 30 天内合并 PR
- 28
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
johannesjo/parallel-code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
johannesjo/parallel-code#385 ·
维护者通常 4 天内回复
-
Option to show usage as used instead of left, and potential further customization ideas可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 83/100
johannesjo/parallel-code#353 ·
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
johannesjo/parallel-code#163 · 2 条评论 ·
维护者通常 4 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 12/100
johannesjo/parallel-code#375 · 2 条评论 ·
维护者通常 4 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
johannesjo/parallel-code#374 ·
维护者通常 4 天内回复
查看 johannesjo/parallel-code 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
ci
难度 2/5 1-3 小时 新手友好度 78/100
ClickHouse/clickhouse-js#1248 ·
维护者通常 1 天内回复
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechselt未关闭technik
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 84/100
AhmedNAgy25/analysor#25 ·
维护者通常 1 天内回复