Re: [PATCH 2/3] branch: suggest how to undo a --set-upstream when given one branch
On Tue, 2012-07-10 at 10:40 -0700, Junio C Hamano wrote:
Show 19 quoted lines
> Carlos Martín Nieto <cmn@elego.de> 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 <cmn@elego.de>
>
> 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?
>
> Doesn't "git branch [-f] frotz" without any other argument trigger
> the warning?
It does. Oops. Fixed.
cmn