Re: [PATCH] Detached HEAD (experimental)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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                   andreas.ericsson@xxxxxx
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]