Subject: Re: [RFC PATCH] push: start warning upcoming default change for push.default

From: Clemens Buchacher <[email-masked]>
Date: Fri, 16 Mar 2012 09:51:52 +0100

Hi,

On Fri, Mar 09, 2012 at 09:31:26AM +0100, Matthieu Moy wrote:
>
> In preparation for flipping the default to the "upstream" mode from the
> "matching" mode that is the upstream default, start warning users when they
> rely on unconfigured "git push" to default to the "matching" mode.

I haven't had time to follow the entire discussion, but I have been
thinking about this myself a little and I also find it hard to decide
between "current" and "upstream". So I just wanted to throw in another
option:

If neither default is the right thing to do, then we should not choose
either. Instead, by default make push act according to "current" or
"upstream" only if they would do the same thing anyways. In other words,
push the current branch only if it is also tracking a remote branch of
the same name.

If "current" and "upstream" disagree, git push errors out and asks the
user to use an explicit refspec or change push.default according to
their preferred workflow.

Clemens