Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files

2018-12-03 Thread Stefan Beller
On Thu, Nov 29, 2018 at 7:33 AM Duy Nguyen wrote: > > On Wed, Nov 28, 2018 at 9:30 PM Stefan Beller wrote: > > > > On Wed, Nov 28, 2018 at 12:09 PM Duy Nguyen wrote: > > > > > > On Wed, Nov 28, 2018 at 9:01 PM Duy Nguyen wrote: > > > > should we do > > > > something about detached HEAD in this

Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files

2018-11-29 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Nov 28, 2018 at 9:01 PM Duy Nguyen wrote: >> should we do >> something about detached HEAD in this switch-branch command (or >> whatever its name will be)? >> >> This is usually a confusing concept to new users > > And it just occurred to me that perhaps we should

Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files

2018-11-29 Thread Duy Nguyen
On Wed, Nov 28, 2018 at 9:30 PM Stefan Beller wrote: > > On Wed, Nov 28, 2018 at 12:09 PM Duy Nguyen wrote: > > > > On Wed, Nov 28, 2018 at 9:01 PM Duy Nguyen wrote: > > > should we do > > > something about detached HEAD in this switch-branch command (or > > > whatever its name will be)? > > >

Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files

2018-11-28 Thread Junio C Hamano
Stefan Xenos writes: > So - IMO - detaching should always be an explicit action. Some options > that occur to me: > > git switch-branch --detach That is the most obvious way to spell it, and it is why we have "git checkout --detach". If we were to split one half of "checkout" into

Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files

2018-11-28 Thread Stefan Xenos
I think users have problems with detached heads for several reasons: 1. Users often enter the detached head state unexpectedly (for example, by mistyping a "checkout" command or not understanding its multipurpose nature, or as a side-effect of running a submodule command). The change described

Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files

2018-11-28 Thread Stefan Beller
On Wed, Nov 28, 2018 at 12:09 PM Duy Nguyen wrote: > > On Wed, Nov 28, 2018 at 9:01 PM Duy Nguyen wrote: > > should we do > > something about detached HEAD in this switch-branch command (or > > whatever its name will be)? > > > > This is usually a confusing concept to new users > > And it just

Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files

2018-11-28 Thread Duy Nguyen
On Wed, Nov 28, 2018 at 9:01 PM Duy Nguyen wrote: > should we do > something about detached HEAD in this switch-branch command (or > whatever its name will be)? > > This is usually a confusing concept to new users And it just occurred to me that perhaps we should call this "unnamed branch" (at

Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files

2018-11-28 Thread Duy Nguyen
On Tue, Nov 27, 2018 at 5:53 PM Nguyễn Thái Ngọc Duy wrote: > > v2 is just a bit better to look at than v1. This is by no means final. > If you think the command name is bad, the default behavior should > change, or something else, speak up. It's still very "RFC". > > v2 breaks down the giant