Configurable worktree include: bring git-ignored files in, carry untracked files back on merge
Los mantenedores suelen responder en 4 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- git, typescript
- Área
- devtools
Línea de trabajo
Start by reading the existing SYMLINK_CANDIDATES handling and locating mergeTask() and worktree creation. The issue proposes enumerating ignored entries with git ls-files --others --ignored --exclude-standard --directory, but configuration storage, defaults, and carry-back conflicts are unresolved. Done means users can choose symlink or copy for selected entries and optionally carry new untracked files back on merge, with those policies decided.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Background & motivation
A git worktree only contains tracked files, so ignored files never appear in a new worktree. Under AI-driven workflows this causes two pain points:
- Broken context: AI workflows often generate documents in the repo root (plans, design notes, context files). We usually don't want to commit them, so we ignore them via
.gitignore— but agents working inside a worktree need exactly those documents to keep context consistent. - Lost output: untracked files an agent newly creates inside a worktree (e.g.
docs/xxx.md) are permanently lost when the task is merged and the worktree is removed.
Today parallel-code works around this with a hardcoded allowlist (SYMLINK_CANDIDATES, only 8 entries such as .env and node_modules) that gets symlinked into each worktree. It cannot cover user-defined ignored files.
Proposal
Make worktree creation and merge behavior configurable per task:
- On task creation: let the user check which ignored files/directories to bring into the worktree (e.g.
.env,docs/), and choose how each entry is brought in:- Symlink: shared with the main checkout (good for large directories that don't need isolation, like
node_modules); - Copy: an independent copy inside the worktree (good for documents the agent may modify, like
.env).
- Symlink: shared with the main checkout (good for large directories that don't need isolation, like
- On task merge: optionally carry untracked files newly created inside the worktree (e.g.
docs/xxx.md) back into the project root, so output isn't lost when the worktree is removed.
Relationship to Claude Code's .worktreeinclude
Claude Code's .worktreeinclude solves a similar problem, but it only copies ignored files one way, at creation time; they are deleted together with the worktree on cleanup and never carried back to the main checkout. This proposal extends that idea with:
- a per-entry choice of symlink vs. copy (symlink avoids the copy cost of large directories like
node_modules; copy guarantees isolation); - carrying untracked files created in the worktree back to the project root on merge, preventing output loss.
Implementation sketch
- Enumeration:
git ls-files --others --ignored --exclude-standard --directory, collapsed to top-level entries of the repo root. A single command covers all ignore mechanisms (.gitignore, nested gitignores,.git/info/exclude, global excludesFile) — no need to parse gitignore syntax ourselves..worktrees/and.gitmust be force-excluded (to avoid linking the worktree directory into itself). - Creation: symlink or copy each checked entry according to its config.
- Merge: in
mergeTask(), beforeremoveWorktree, copy the entries marked as "carry back" from the worktree to the project root. - This feature can replace the existing hardcoded
SYMLINK_CANDIDATESallowlist.
Open questions
- Where should the configuration live: a
.worktreeinclude-style file inside the repo (shareable via git, compatible with Claude Code conventions) vs. an in-app per-project setting? - On carry-back in copy mode, if the same file was also modified in the main checkout, how should conflicts be handled (overwrite / skip with a warning / keep both)?
- Default selection policy (large ignored directories like
dist/should presumably not be copied by default?)
- Lenguaje dominante
- TypeScript
- Estrellas
- 1k
- Forks
- 144
- Merge medio
- 4 d 19 h
- PR fusionados (30 d)
- 28
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de johannesjo/parallel-code
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
johannesjo/parallel-code#385 ·
Los mantenedores suelen responder en 4 días
-
Option to show usage as used instead of left, and potential further customization ideasPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
johannesjo/parallel-code#353 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
johannesjo/parallel-code#163 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
johannesjo/parallel-code#375 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
Package as a PlatpakAbiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
johannesjo/parallel-code#374 ·
Los mantenedores suelen responder en 4 días
Todos los issues de johannesjo/parallel-code
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
ci
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ClickHouse/clickhouse-js#1248 ·
Los mantenedores suelen responder en 1 día
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltAbiertotechnik
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
AhmedNAgy25/analysor#25 ·
Los mantenedores suelen responder en 1 día