From: Carlos Martín Nieto Date: Wed, 11 Jul 2012 14:24:55 GMT Subject: Re: [PATCH 2/3] branch: suggest how to undo a --set-upstream when given one branch Message-ID: <1342016695.6458.14.camel@centaur.cmartin.tk> In-Reply-To: <7va9z7ikfi.fsf@alter.siamese.dyndns.org> On Tue, 2012-07-10 at 10:40 -0700, Junio C Hamano wrote: > Carlos Martín Nieto writes: > > > This interface is error prone, and a better one (--set-upstream-to) > > exists. Suggest how to fix a --set-upstream invocation in case the > > user only gives one argument, which makes it likely that he meant to > > do the opposite, like with > > > > git branch --set-upstream origin/master > > > > when they meant one of > > > > git branch --set-upstream origin/master master > > git branch --set-upstream-to origin/master > > > > Signed-off-by: Carlos Martín Nieto > > The new code does not seem to depend on the value of "track" (which > is set by either -t or --set-upstream) in any way. Shouldn't it be > done only when it is set to track-override? Yes, yes it should. > > Doesn't "git branch [-f] frotz" without any other argument trigger > the warning? It does. Oops. Fixed. cmn