Re: [PATCH/RFC] builtin-checkout: suggest creating local branch when appropriate to do so
- From
Uri Okrent <uokrent@gmail.com>
- Date
- Oct 25, 2009, 17:48 UTC
- Message-ID
- <4AE48F88.1030108@gmail.com>
- In-Reply-To
- <7vhbu2syi6.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 10 quoted lines
> In this sequence: > > 1$ git checkout $commit_name_that_is_not_a_local_branch > 2$ git commit; hack; hack; hack;... > 3$ git checkout $branch_name > [...] > Step #3 is where the state built in the detached HEAD "branch" vanishes > into lost-found. > > The experts argued that #3 is where it is dangerous...
If step 3 is where the danger lies, wouldn't it then be most appropriate to put the warning message there? I.e., warn or refuse to switch branches when currently on a detached head containing new commits, kind of like branch -d's cowardliness.
--
Uri
Please consider the environment before printing this message.
http://www.panda.org/how_you_can_help/