Files
devvm/testdata/script
w3cjandClaude Opus 5.5 3c4a77349c fix(clone): rm checks every worktree inside a --clone VM's clone
devvm rm on a --clone VM ran git status only in the clone's main
checkout, so uncommitted changes in other worktrees in the VM went with
it unasked. It lists the clone's worktrees (git worktree list
--porcelain -z, at most 1 MiB read) and checks each one's status,
showing the changes under each worktree's path, 20 in all.

The list comes from the VM, so only clean absolute paths inside the
clone are used, each once, and bare or prunable ones are skipped; a
worktree whose folder is gone has nothing to lose. Paths go to the VM
only as an argument and are shown through msg.Shown. At most 100
worktrees are checked; past that devvm says so and asks anyway.

- internal/vm/clone.go: cloneChanges, cloneWorktrees, insideClone,
  showChanges, cloneExec, worktreeStatus, cloneWorktreesMax
- messages: clone_worktree_dirty, clone_worktrees_unchecked (linked
  to using/clone#deleting-the-vm)
- tests: TestCloneWorktrees, TestCloneRmWorktrees,
  TestCloneRmTooManyWorktrees; clone.txtar's dirty worktree; the
  limactl stub's git worktree list and worktree status; e2e clone's
  dirty-worktree check
- docs: using/clone.md's Deleting the VM and a new section, Several
  agents in one VM; internals/overview.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 22:28:06 -07:00
..
2026-10-25 13:43:00 -06:00