Skip to content

Release 2.1.79 (2026-06-29)

Features

  • anchor worktree add to /.worktrees to prevent nesting (#1923) vrg-git worktree add passed paths straight to git, so a relative .worktrees/<name> path run while the CWD was inside another worktree silently nested the new worktree inside the existing one. A repeated batch produced a Russian-doll layout; when the outer worktree was later removed it destroyed the nested ones, leaving the registry pointing at vanished paths and aborting the batch on exit 128.

Add a guard that resolves the target of worktree add and requires it to be a direct child of /.worktrees/. This one invariant rejects both the relative-path nesting case and any absolute/.. path that escapes the canonical container, while a legitimate sibling add from the project root passes unchanged. When the root cannot be resolved (not in a repo) the guard is skipped so git reports its own error. Internal managed_worktree callers invoke git directly and are unaffected.