On Tue, 02 Jan 2007 14:44:31 -0800, Junio C Hamano wrote: > We could do two things, and I think disallowing commits is not > necessarily a better option of the two. We could allow commits > and prevent the user from switching out of the detached HEAD > state without an explicit action instead. Yeah, that would be fine too. Personally, I'd be happy with either approach. > "git-checkout" but there may be other cases. In either way, we > need a safety valve, which the experimental code does not have. OK. I guess I misinterpreted things. I was afraid that you were proposing a safety valve on _entering_ the detached state, (perhaps the -d option to checkout itself). It was the requirement of something extra to checkout a tag (as opposed to checkout of a branch) that I disliked. > In any case, I did this because I got tired of waiting for it to > happen (I thought you wanted to hack on this over the long > week^W yearend, so I deliberately stayed away from doing this) > and I was bored. This will not be in 'next' in the current > shape. I'm glad you went ahead. I ended up almost not touching computers at all from December 23 to January 2 [*]. > You've thought about the issue long enough to write your > commentary and I agree to most of your points (including > favoring "no commit allowed in this state" over "allow commits > and merges to help advanced usage" for its simplicity), so if > you code it up with a clean patch, I would not reject it on the > basis of its design. I don't actually prefer "no commit allowed". I just didn't want the user to have to explicitly disable the safety before being able to perform a checkout based on a tag. I am still interested in this feature, so I will try to find time to come back with a revised version of your patch with the missing safety check (and without requiring -d on checkout). Thanks again for this initial take on the problem. (Though if anyone else beats me to it, I certainly will not be offended.) -Carl [*] I did play some nice new (to me) board games, (Zendo and DVONN being standouts), but thats a topic for elsewhere I suppose.
Attachment:
pgpQUF6LRerLR.pgp
Description: PGP signature