This page was translated automatically from English, the only language this site is written in. Read the original.
A misplaced worktree is brought to its canonical path with its modified, staged, unstaged and untracked work intact, verified by a fingerprint taken before and after the move, and a step is reported as moved only when the two are equal
majordomus worktree migrate brings a worktree to its canonical path exactly as it is:
declared status○declared status: guaranteedDeclared deterministic and blocking, implemented, and naming the behavioural test that is to prove it. Whether a recorded run supports it is the evidence verdict, shown beside it.
recorded evidence○recorded evidence: not runDeclared guaranteed, and not supported by a recorded run: the test is named, and no passing run of the current inputs is recorded. how evidence is recorded
The plan changes nothing and is recomputed under the repository lock before it is applied. Git moves the directory in one rename; the container's occupant goes out to a staging path and then in; a move across filesystems is refused unless a copy is permitted, and then verified against a manifest of every entry before the original is removed. Nothing is reset, stashed, cleaned, checked out or overwritten: a destination that exists is a named conflict, a locked worktree waits, a detached one is never moved, and a session's scratch checkout is reported and moved only on request.
majordomus worktree migrate brings a worktree to its canonical path exactly as it is:
modified, staged, unstaged and untracked files included, the branch and HEAD unchanged.
Each move is fingerprinted before and after and reported as moved only when the two
fingerprints are equal.
migrate::plan lists every misplaced worktree with a branch, the container's occupant
first, with what blocks each. migrate::apply recomputes it under the repository lock and,
per step, captures a WorktreeFingerprint — branch, HEAD, the index, the staged diff, the
unstaged diff, every untracked file with its content hash, every ignored entry by presence
— runs git worktree move with absolute paths, captures the fingerprint at the destination,
checks git registers it there, and compares. The occupant of the container goes out to a
staging path and then in; a move across filesystems is made by copy, git worktree repair,
verification against a manifest of every entry, and only then removal of the original, and
only with --allow-copy. Relative links that no longer resolve are named.
A locked worktree is blocked until unlocked; a detached worktree has no canonical path and
is never moved; a session's scratch checkout is moved only with --include-ephemeral; a
destination that exists is never overwritten. The fingerprint attests ignored content by
presence and size, not by content: it moves with the directory as everything else does.
A misplaced worktree is brought to its canonical path with its modified, staged, unstaged and untracked work intact, verified by a fingerprint taken before and after the move, and a step is reported as moved only when the two are equal