Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-25 Thread Mike Rappazzo
On Fri, Mar 25, 2016 at 7:41 AM, Duy Nguyen wrote: > On Fri, Mar 25, 2016 at 6:31 PM, Zhang Lei wrote: >> By the way, Duy, another unrelated question: why worktree name under >> .git/worktrees is being named >> after the working tree path basename? I

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-25 Thread Duy Nguyen
Please don't top-post. On Fri, Mar 25, 2016 at 7:06 PM, Zhang Lei wrote: > Yes, path basename makes sense. > I am asking this question because we have some legacy code requires > that working tree > called something like 'src', as a result, multiple branch would have >

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-25 Thread Zhang Lei
Yes, path basename makes sense. I am asking this question because we have some legacy code requires that working tree called something like 'src', as a result, multiple branch would have src1 src2 src3 under .git/worktrees which could not be easy to maintain. I agreed with you, we should give

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-25 Thread Duy Nguyen
On Fri, Mar 25, 2016 at 6:31 PM, Zhang Lei wrote: > By the way, Duy, another unrelated question: why worktree name under > .git/worktrees is being named > after the working tree path basename? I think branch name is more > reasonable since we don't allow checking out > the

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-25 Thread Zhang Lei
Thanks for the clarification. By the way, Duy, another unrelated question: why worktree name under .git/worktrees is being named after the working tree path basename? I think branch name is more reasonable since we don't allow checking out the same branch twice. 2016-03-25 9:49 GMT+08:00 Duy

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-24 Thread Duy Nguyen
On Fri, Mar 25, 2016 at 8:29 AM, Eric Sunshine wrote: > On Thu, Mar 24, 2016 at 9:22 PM, Eric Sunshine > wrote: >> On Thu, Mar 24, 2016 at 5:52 AM, Zhang Lei wrote: >>> 2016-03-24 17:16 GMT+08:00 Duy Nguyen

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-24 Thread Eric Sunshine
On Thu, Mar 24, 2016 at 9:22 PM, Eric Sunshine wrote: > On Thu, Mar 24, 2016 at 5:52 AM, Zhang Lei wrote: >> 2016-03-24 17:16 GMT+08:00 Duy Nguyen : >>> I think we can follow git-clone and use '-n' for this. [...] >> >> My PATCH

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-24 Thread Eric Sunshine
[please respond inline rather than top-posting] On Thu, Mar 24, 2016 at 5:52 AM, Zhang Lei wrote: > 2016-03-24 17:16 GMT+08:00 Duy Nguyen : >> I think we can follow git-clone and use '-n' for this. [...] > > My PATCH v1 did follow git-clone -n, however,

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-24 Thread Eric Sunshine
On Thu, Mar 24, 2016 at 2:07 AM, Ray Zhang wrote: > By adding this option which defaults to true, we can use the > corresponding --no-checkout to make some customizations before > the checkout, like sparse checkout, etc. This version of the patch looks better. Thanks. A

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-24 Thread Zhang Lei
hi Duy, My PATCH v1 did follow git-clone -n, however, Junio C Hamano and Eric Sunshine suggested that we should avoid doing so , as --no-no-checkout could be confusing. Yes, core.sparsecheckout is the global switch for all worktrees, but every worktree can have its own info/sparse-checkout.

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-24 Thread Duy Nguyen
On Thu, Mar 24, 2016 at 1:07 PM, Ray Zhang wrote: > By adding this option which defaults to true, we can use the > corresponding --no-checkout to make some customizations before > the checkout, like sparse checkout, etc. I think we can follow git-clone and use '-n' for