Re: [RFC PATCH] push: start warning upcoming default change for push.default
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Mar 17, 2012, 20:46 UTC
- Message-ID
- <vpqvcm3vttw.fsf@bauges.imag.fr>
- In-Reply-To
- <20120316214832.GB25092@ecki>
Clemens Buchacher <drizzd@aon.at> writes:
Show 24 quoted lines
> On Fri, Mar 16, 2012 at 01:42:36PM +0100, Matthieu Moy wrote: >> Junio C Hamano <gitster@pobox.com> writes: >> >> > Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes: >> > >> >> I'd count "upstream is not set" as "current and upstream agree on >> >> 'current'". IOW, use "current", but error out if there's a configured >> >> upstream that is different. >> > >> > And if there is no configured upstream, should it error out, or should it >> > just push the current one to its own name? >> >> I meant just push the current one to its own name. > > Altough in a somewhat rarer case, this has the same problem as > "current": > > git checkout -b master origin/master > git checkout -b topic master > git push > > If a branch called topic already exists on origin, push will now try to > update it with the local branch topic. But they do not have any clear > connection, except for the name.
Yes, but the user can hardly expect anything else here. So, it may be a (user) mistake, but it's not a surprise.
BTW, 'matching' also has this drawback, and I never saw anyone complain about it (maybe I didn't listen enough though).
-- Matthieu Moy http://www-verimag.imag.fr/~moy/