Re: [PATCH] checkout: warn about 'branch name' rather than 'local branch'
- From
Nicolas Pitre <nico@fluxnic.net>
- Date
- Jan 29, 2010, 21:40 UTC
- Message-ID
- <alpine.LFD.2.00.1001291621020.1681@xanadu.home>
- In-Reply-To
- <1264799342-11093-1-git-send-email-srabbelier@gmail.com>
On Fri, 29 Jan 2010, Sverre Rabbelier wrote:
Show 8 quoted lines
> These days, you can say "git checkout topic" to automagically create > a local "topic" branch that forks from "origin/topic" remote tracking > branch when you have one, thanks to Dscho's UI improvement ideas. As > such it is more appropriate to say that the user is checking out > something that is not a branch name, rather than saying it is not a > 'local branch'. > > Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
For the record, I'm providing a NAK. First I don't agree with the UI "improvement" if there is no way to check out a remote branch without creating soon-to-be-stall local branches with the same name.
Next, the message can be made yet more clear and give the user more of a hint with what is going on. Something like:
"%s is not a local branch head: creating a detached HEAD\n"
plus the remaining clue lines. This way people will have a much greater chance of understanding what state they're in, and a simple Google search for detached HEAD gives you the Git manual page with the needed info.
Nicolas