← 教程列表
coding

Automated (run in Claude Code after implementation)

📅 2026/6/12 16:30:02⏱ 约 5 分钟阅读👁 9 阅读

1. Normal repo detection — assert IN_LINKED_WORKTREE=false 2. Linked worktree detection — `git worktree add` test worktree, assert IN_LINKED_WORKTREE=true 3. Detached HEAD detection — `git checkout --detach`, assert ON_DETACHED_HEAD=true 4. Finishing skill handoff output — verify handoff message (not 4-option menu) in restricted environment 5. **Step 5 cleanup guard** — create a linked worktree (`git worktree add /tmp/test-cleanup -b test-cleanup`), `cd` into it, run the Step 5 cleanup detection (`GIT_DIR` vs `GIT_COMMON`), assert it would NOT call `git worktree remove`. Then `cd` back to main repo, run the same detection, assert it WOULD call `git worktree remove`. Clean up test worktree afterward.

← 返回教程列表 AI8899 · 内容仅供学习参考