For users that are working on several orthogonal features at once in different branches, the git worktree command added in version 2.5 is nice, as it allows each branch to be checked out to a different working directory while they all share the same Git repository underneath.
This workflow is sort-of supported by arc, except that arc land would fail when trying to switch back to the branch being merged to (e.g. master) since git worktree strictly enforces the rule that no two work trees may be based on the same git branch.
Even arc land --keep-branch switches back to the branch the revision is being landed on.
This is not fatal since the error happens after the revision is landed, but it would be nice if arc would do this if the current directory is a worktree:
- switch to the directory containing the main git checkout
- delete the worktree directory
- git worktree prune to remove reference to the deleted worktree
- git branch -D to delete the branch