Subject: Re: [PATCH v4 4/4] worktree: make add <path> dwim

From: Thomas Gummerer <[email-masked]>
Date: Sun, 26 Nov 2017 11:37:06 +0000

On 11/26, Junio C Hamano wrote:
> Thomas Gummerer <[email-masked]> writes:
> 
> > Of course that assumes that it's used directly, not in scripts, and
> > that users will actually read the output of the command when they
> > invoke it.  Maybe these are not safe assumptions to make though, and
> > we'd rather not have this on by default then.
> 
> None of these is a safe assumption to make.  With a transition plan,
> we could change the default eventually, but if this feature is already
> used by real users, the proposed change without any transition plan
> will hurt them and make them hate us, I am afraid.

Fair enough, I definitely wouldn't want users to hate us.  I guess
I'll add this to the list of things that I'd like to change when git
3.0 comes along.

How about once we make the decision when git 3.0 happens, adding a
warning:

    warning: The current behaviour of creating a branch from HEAD when
    no <branch> is given will change in git 3.0, to try and match the
    new branch name to a remote-tracking branch.  To get rid of this
    warning in the meantime, set git.guessRemote to true or false,
    depending on whether you'd like to enable the new behaviour now,
    or would like to keep the existing behaviour. (see also
    --guess-remote in man git-worktree)

or something along the lines, and once we decide to release git 3.0 we
flip the default?  The warning would be displayed whenever the new
behaviour would be invoked, but no config option or flag is set.

Either way I'm going to add a flag and a config option to hide this
behaviour behind for now.

Thanks!