Repository navigation
0.9.87
The worktree audit called two kinds of worktree safe that git worktree remove destroys work in. The first held an ignored file that exists nowhere else, such as .env or .claude/settings.local.json, because the status call skipped ignored files. The second had a commit no branch, tag, or remote reaches, such as one made on a detached HEAD before switching back to the trunk, because the audit checked only the current HEAD. Removing the worktree deletes its HEAD reflog, which leaves that commit for git gc to prune.
The audit now asks git status for ignored paths with --ignored=matching and counts those outside a named list of build and cache directories (DISPOSABLE in worktree-audit.mjs: node_modules, .venv, __pycache__, dist, build, target, and others). It prints the count as ignored:N and holds the worktree as hold-ignored. It also walks the worktree's HEAD reflog and counts commits that no branch, tag, remote, or branch reflog reaches, then prints reflog:N and holds it as hold-reflog. A branch reflog lives in the shared logs and outlives the worktree, so a rebased branch's old tip does not count. The worktree-cleanup playbook names both labels and the commands that list what they count.