Re: [PATCH v3 17/21] switch: no implicit dwim, use --guess to dwim

2019-03-17 Thread Junio C Hamano
Eric Sunshine writes: > With git-checkout, it's very easy to accidentally get into a detached > HEAD state, so it makes some sense to protect newcomers, by default, > from that accident in git-switch. However, auto-creation of a new > local branch is not, for a couple reasons, nearly so weighty a

Re: [PATCH v3 17/21] switch: no implicit dwim, use --guess to dwim

2019-03-15 Thread Duy Nguyen
On Thu, Mar 14, 2019 at 1:36 AM Eckhard Maaß wrote: > And while at it - what should happen, if: > > - there is a tag named example > - no local branch example > - a branch at origin/example > > ... and we switch then? Right now it just gives "cannot find branch", > should there be more information

Re: [PATCH v3 17/21] switch: no implicit dwim, use --guess to dwim

2019-03-15 Thread Duy Nguyen
On Fri, Mar 15, 2019 at 3:19 PM Eric Sunshine wrote: > > On Wed, Mar 13, 2019 at 2:36 PM Eckhard Maaß > wrote: > > On Fri, Mar 08, 2019 at 04:57:48PM +0700, Nguyễn Thái Ngọc Duy wrote: > > > Similar to automatic detach, this behavior could be confusing because > > > it can sometimes create a new

Re: [PATCH v3 17/21] switch: no implicit dwim, use --guess to dwim

2019-03-15 Thread Eric Sunshine
On Wed, Mar 13, 2019 at 2:36 PM Eckhard Maaß wrote: > On Fri, Mar 08, 2019 at 04:57:48PM +0700, Nguyễn Thái Ngọc Duy wrote: > > Similar to automatic detach, this behavior could be confusing because > > it can sometimes create a new branch without a user asking it to, > > especially when the user i

Re: [PATCH v3 17/21] switch: no implicit dwim, use --guess to dwim

2019-03-13 Thread Eckhard Maaß
On Fri, Mar 08, 2019 at 04:57:48PM +0700, Nguyễn Thái Ngọc Duy wrote: > Similar to automatic detach, this behavior could be confusing because > it can sometimes create a new branch without a user asking it to, > especially when the user is still not aware about this feature. > > In the future, per

[PATCH v3 17/21] switch: no implicit dwim, use --guess to dwim

2019-03-08 Thread Nguyễn Thái Ngọc Duy
Similar to automatic detach, this behavior could be confusing because it can sometimes create a new branch without a user asking it to, especially when the user is still not aware about this feature. In the future, perhaps we could have a config key to disable these safety nets and let 'switch' do