Re: [PATCH] clone: in protocol v2, use remote's default branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 16, 2020 at 12:56:22PM -0800, Junio C Hamano wrote:

> > I think:
> >
> >   git checkout --guess origin
> >
> > would make sense to dereference origin/HEAD to "foo", as if we had said
> > "git checkout foo". That's the explicit part that seems safe. My
> > question is whether:
> >
> >   git checkout origin
> >
> > should likewise do so.
> 
> I see.  I think "--guess" is by default true, so unless you have
> checkout.guess=false configured, my answer to the above question is
> yes.

Yes, I agree with the current definition of "--guess", the two would be
the same. I'm just concerned that people will be unhappy with changing
the behavior of the latter, so everything else (the "tri-state --guess"
thing) is an attempt to band-aid over that.

If we decide it's not a concern worth addressing, then I agree the two
should behave the same. I'm just not convinced it won't annoy people who
are used to how "git checkout" works now with non-local branches.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux