Re: [RFC] Detached-HEAD reminder on commit?

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

 



Johan Herland <johan@xxxxxxxxxxx> writes:

> On Tuesday 02 September 2008, Stephan Beyer wrote:
>> Junio C Hamano wrote:
>> > Pieter de Bie <pdebie@xxxxxxxxx> writes:
>> > > Vienna:git pieter$ ./git commit --allow-empty -m"test"
>> > > Created commit 6ce62c8b: test
>> > > You are on a detached head, so this commit has not been recorded in a
>> > > branch. If you don't want to lose this commit, checkout a branch and
>> > > then run: git merge 6ce62c8bfcfb341106f3587d1c141c3955c2544c
>> > >
>> > > Are there any comments to this / strong opinions against such a
>> > > change?
>> >
>> > Unconditionally doing this is too loud for my taste.  You probably can
>> > do this in your post-commit hook.
>>
>> Well, Pieter probably can do this in his post-commit hook. But I think
>> this is useful for usability... especially for beginners who might not
>> even know what a hook is. ;)
>
> I'm not sure I like this personally, but if we _really_ don't want newbies 
> to shoot themselves in the foot, we could make "git commit" fail on a 
> detached HEAD unless the user has indicated that s/he knows what's going 
> on; i.e. something like this:

If we _really_ don't want newbies to shoot themselves in the foot, we
probably can issue a loud warning when they detach there HEAD.

Oh, wait,... we already do that.
--
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]

  Powered by Linux