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

2018-03-24 Thread Thomas Gummerer
On 03/20, Eric Sunshine wrote: > On Sat, Mar 17, 2018 at 6:22 PM, Thomas Gummerer wrote: > > [...] > > However we can do a little better than that, and check the branch out if > > it is not checked out anywhere else. This will help users who just want > > to check an

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

2018-03-20 Thread Eric Sunshine
On Sat, Mar 17, 2018 at 6:22 PM, Thomas Gummerer wrote: > [...] > However we can do a little better than that, and check the branch out if > it is not checked out anywhere else. This will help users who just want > to check an existing branch out into a new worktree, and

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

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