"git branch --list" learned to show branches that are checked out
in other worktrees connected to the same repository prefixed with
'+', similar to the way the currently checked out branch is shown
with '*' in front.
* nb/branch-show-other-worktrees-head:
branch: add worktree info on verbose output
branch: update output to include worktree info
ref-filter: add worktreepath atom
branch-two
EOF
git checkout branch-one &&
- git worktree add worktree branch-two &&
++ test_when_finished "
++ git worktree remove worktree_dir
++ " &&
+ git worktree add worktree_dir branch-two &&
{
git branch --show-current &&
- git -C worktree branch --show-current
+ git -C worktree_dir branch --show-current
} >actual &&
- rm -r worktree_dir &&
- git worktree prune &&
test_cmp expect actual
'