From: Sam Vilain Date: Thu, 30 Oct 2008 23:28:29 GMT Subject: Re: [PATCH] Documentation: add a planning document for the next CLI revamp Message-ID: <1225409309.6765.5.camel@maia.lan> In-Reply-To: On Thu, 2008-10-30 at 14:28 -0400, Nicolas Pitre wrote: > > For the case where the thing you type is a resolvable reference, it > > would just check it out, as now. > As long as it checks it out with a detached head if it is a remote > branch then I have no issue. Absolutely - if you've already got a branch "master", then "git checkout master" should definitely give it to you. If you go "git checkout origin/master", you get a floating head. But I quite often find myself wanting to check out a remote branch, and give it a name just like on the remote. I want "git checkout blah" to assume that's what I mean, until I make a local branch "blah". > By default, git creates a branch called "master. Hence, by default, if > you clone that repository, this branch will be called origin/master. So > by default $foo is already ambiguous. Right - 'master' in this case resolves to something. The ambiguity is resolved by defaulting to the thing that resolves. The fall-back behaviour is only triggered if you asked for something that is currently an error. Because breaking expectations sucks. Sam.