Re: Difficulties in advertising a new branch to git newbies

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

 



J. Bruce Fields wrote:
> On Wed, Jan 31, 2007 at 09:31:00AM -0500, Nicolas Pitre wrote:

>> It is not the commit which is dangerous when the head is detached.  It 
>> is the checkout of another branch.  And this case is covered already 
>> such that the checkout is refused unless you actually create a branch 
>> for your detached head or you give -f to checkout to override the 
>> protection.
>> 
>> Giving a warning at commit time is not the place where the user has to 
>> be aware of the issue since it is indeed not the place where there is 
>> any issue to worry about.

I'd like to have some configuration option to make git more careful
and prohibit commiting in detached HEAD state (the default being that
you can commit on top of detached HEAD). More secure but less powerfull.
 
> By the same argument, the original checkout of a non-branch is also not
> the place for a warning; by the time you commit and then do a checkout
> to switch away from the new commit, that original checkout may be a
> distant memory.

But the initial checkout of a non-branch is place where we can notify
user that he does something unexpected / unusual. Though I think that
single-line warning would be enough...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
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]