Subject: Re: [PATCH] Detached HEAD (experimental)

From: Andreas Ericsson <[email-masked]>
Date: Wed, 10 Jan 2007 10:08:24 +0100

Carl Worth wrote:
> 
> Frankly, I don't understand why so much effort is being put toward
> allowing these "fragile commits" to be made in the first place. Why
> not require users to name the branch before creating any commits, just
> as has always been the case?
> 

Agreed. Possibly, we could have commit (or commit-tree) issue a big fat 
warning along the lines of:

*** WARNING ***
You are about to create a commit on a detached HEAD.
It is recommended that you run "git branch <name>" to create a branch to 
commit to first. If you don't, you might lose this commit further on.
*** WARNING ***

which could be suppressed by a "--silently-ignore-detached-head" in case 
scripts (securely) use this behaviour. Since committing on detached 
heads really should be a very rare case I don't think many people will 
find this terribly annoying.

> To me, the only real advantage to the new "detached head" stuff is
> simply making it easier to checkout previous state without having to
> name a new branch precisely _because_ the user has not intent to
> commit anything. If the user is going to commit something, then the
> user should be able to come up with a name for the branch.
> 

Indeed and as I've said before, *all* developers have "silly-names" they 
use for temporary stuff (foo, bar, frotz, nitfol, blaj, fnurg, sdf, ...) 
so it's not like we'll put a heavy burden on peoples imagination.

-- 
Andreas Ericsson                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231