Re: several quick questions
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 14, 2006, 22:26 UTC
- Message-ID
- <7v3bilr2zr.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <200602142317.29626.Josef.Weidendorfer@gmx.de>
Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:
Show 22 quoted lines
> On Tuesday 14 February 2006 22:40, you wrote: >> Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes: >> >> > Why not allow something like >> > >> > git-checkout master~5 >> > >> > which implicitly does create a read-only branch "seek-point"? >> >> Now what does "git-checkout branch" mean? Does it switch to the >> branch, or does it force tip of seek-point to be the tip of >> branch and switch to seek-point branch? More interestingly, >> what does "git-checkout seek-point" mean? > > You are right; it would get quite confusing. > But perhaps the current error message > > git checkout: you need to specify a new branch name > > should be a little bit more explaining by appending > > "... to switch to for being able to checkout the requested revision"
While we are on the subject of improving the error message to better guide users in a likely-to-be-what-he-meant direction, there is another confusing message (I am assuming you are interested in this enough to come up with a patch to fix that "... to switch to ..." thing):
$ git checkout -b test v2.6.10
The user wanted to create a new branch test based on tag v2.6.10, alas that tag does not exist. We give quite confusing error message because we are confused that the user meant to checkout only "./v2.6.10" file and that operation and switching branches are incompatible.