Re: [PATCH v3 11/14] switch-branch: only allow explicit detached HEAD

2019-03-11 Thread Duy Nguyen
On Mon, Mar 11, 2019 at 2:32 AM Eckhard Maaß wrote: > > On Thu, Nov 29, 2018 at 10:58:46PM +0100, Nguyễn Thái Ngọc Duy wrote: > > + if (!opts->implicit_detach && > > + !opts->new_branch && > > + !opts->new_branch_force && > > + new_branch_info->name && > > + !ne

Re: [PATCH v3 11/14] switch-branch: only allow explicit detached HEAD

2019-03-10 Thread Eckhard Maaß
On Thu, Nov 29, 2018 at 10:58:46PM +0100, Nguyễn Thái Ngọc Duy wrote: > + if (!opts->implicit_detach && > + !opts->new_branch && > + !opts->new_branch_force && > + new_branch_info->name && > + !new_branch_info->path) > + die(_("a branch is expected, g

[PATCH v3 11/14] switch-branch: only allow explicit detached HEAD

2018-11-29 Thread Nguyễn Thái Ngọc Duy
"git checkout " will checkout the commit in question and detach HEAD from the current branch. It is naturally a right thing to do once you get git references. But detached HEAD is a scary concept to new users because we show a lot of warnings and stuff, and it could be hard to get out of (until you