Re: git push to a non-bare repository

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

 



Sam Vilain wrote:

> Junio C Hamano wrote:

>>> I don't understand the design choice here: git had two options to
>>> avoid this scenario:
>>
>> Actually, there are no such "design choices".  That's entirely
>> up to the repository owners to arrange post-update hook, to
>> allow you to do anything you want.  
>>
>> The default is not to encourage people (who do not know what
>> they are doing anyway) to push into non-bare repository.
>>   
> 
> Maybe it's worth making it an error (that can be forced) if you're
> pushing to the head that's checked out in a non-bare repository ?
> 
> It's pretty nasty behaviour for people used to darcs / bzr et al.

Perhaps it would be for the best.

BUT unless you arrange some fancy post-update hook you have two
sane choices:
 * push to bare repository, with 1:1 refs mapping
 * push to non-bare repository, but with mapping pushed refs on
   pushee to remotes refs (remote / tracking branches) on remote
   side.

In all other choices there madness lies... ;-)

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