Re: [PATCH v5 5/6] worktree: teach "add" to check out existing branches

2018-03-30 Thread Thomas Gummerer
On 03/27, Eric Sunshine wrote: > On Sun, Mar 25, 2018 at 9:49 AM, 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

Re: [PATCH v5 5/6] worktree: teach "add" to check out existing branches

2018-03-27 Thread Eric Sunshine
On Sun, Mar 25, 2018 at 9:49 AM, 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 v5 5/6] worktree: teach "add" to check out existing branches

2018-03-25 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