Expand description
[worktree] include and .worktreeinclude (Claude Code’s file,
.gitignore syntax): git-ignored files of the person’s checkout — a
.env, a local config — copied into each worktree speccoder runs checks
in, to the same relative path.
Only files git ignores in the checkout are copied, never a tracked one;
regular files only, never through a symlink out of the checkout, never
over a file the worktree tracks, and only inside the worktree. A copied
secret file’s values are masked in everything speccoder shows or hands
on (crate::secrets), a commit never holds a copied file, and an
attempt whose diff adds one of those values is refused.
Structs§
Constants§
- FILE
- Claude Code’s file of patterns, read beside
[worktree] include.
Functions§
- added_
secret - The variable whose copied value a patch’s added lines hold.
- check_
staged - Refuses a commit in the worktree at
topwhose index holds a file copied from the checkout (unstaged then) or whose staged change adds a copied secret value. Nothing is committed then. - copy
- Copies the files
matchednames fromcheckout(the project’s directory there) to the same paths underproject(its directory in the worktreeworktree): new ones, and again those whose content changed. Registers each copied secret file’s values for masking. - forget
- Forgets a worktree’s record of copies (before the worktree is removed).
- load
- The worktree’s record of copies (none: nothing copied).
- matched
- The files the patterns name in the checkout’s project directory that git
ignores there, project-relative:
[worktree] include’s patterns and.worktreeinclude’s, together. Regular files only, inside the checkout. - pathspecs
- The pathspecs keeping each copied file out of what
git addstages in the worktree attop, whatever the ignore rules say: one for each that git does not ignore there now (an attempt can un-ignore one). An ignored one needs none — and naming it would makegit addfail. - record_
path - Where a worktree’s record of copies is kept: beside it, never inside.
- register
- Masks the worktree’s copied values from now on (
values). - values
- What the worktree’s copied secret files (
.env*and the rest the model may not read) give to mask, as(NAME, value), read from the copies (crate::secrets::to_mask).