Re: [PATCH v8 4/4] worktree: teach "add" to check out existing branches

2018-04-23 Thread Eric Sunshine
On Mon, Apr 23, 2018 at 3:38 PM, Thomas Gummerer wrote: > Currently 'git worktree add ' creates a new branch named after the > basename of the path by default. If a branch with that name already > exists, the command refuses to do anything, unless the '--force' option > is

[PATCH v8 4/4] worktree: teach "add" to check out existing branches

2018-04-23 Thread Thomas Gummerer
Currently 'git worktree add ' creates a new branch named after the basename of the path by default. If a branch with that name already exists, the command refuses to do anything, unless the '--force' option is given. However we can do a little better than that, and check the branch out if it is