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 given. > > However we c

Re: [PATCH v5 4/6] worktree: factor out dwim_branch function

2018-03-27 Thread Eric Sunshine
On Sun, Mar 25, 2018 at 9:49 AM, Thomas Gummerer wrote: > Factor out a dwim_branch function, which takes care of the dwim'ery in > 'git worktree add '. It's not too much code currently, but we're > adding a new kind of dwim in a subsequent patch, at which point it makes > more sense to have it as

Re: [PATCH v5 3/6] worktree: remove force_new_branch from struct add_opts

2018-03-27 Thread Eric Sunshine
On Sun, Mar 25, 2018 at 9:49 AM, Thomas Gummerer wrote: > The 'force_new_branch' flag in 'struct add_opts' is only used inside the > add function, where we already have the same information stored in the > 'new_branch_force' variable. Avoid that unnecessary duplication. When I was reviewing your

Re: [PATCH v5 2/6] worktree: be clearer when "add" dwim-ery kicks in

2018-03-27 Thread Eric Sunshine
On Sun, Mar 25, 2018 at 9:49 AM, Thomas Gummerer wrote: > Currently there is no indication in the "git worktree add" output that > a new branch was created. This would be especially useful information > in the case where the dwim of "git worktree add " kicks in, as the > user didn't explicitly as

Re: [PATCH v5 0/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: > Thanks Eric for the review of the previous round and Duy and Junio for > additional comments. > This round should address all of Eric's comments from the previous round. Thanks, it appears to cover my review comments from the previous roun

<    1   2