branch-two
EOF
git checkout branch-one &&
+ test_when_finished "
+ git worktree remove worktree_dir
+ " &&
git worktree add worktree_dir branch-two &&
{
git branch --show-current &&
git -C worktree_dir branch --show-current
} >actual &&
- rm -r worktree_dir &&
- git worktree prune &&
test_cmp expect actual
'