Thread (2 messages) flat view 2 messages, 1 author, 2016-06-15

Re: [PATCH/RFC] Revoke write access to refs and odb after importing another repo's odb

From: Duy Nguyen <hidden>
Date: 2016-06-15 22:55:52

On Wed, Jan 23, 2013 at 8:34 PM, Nguyễn Thái Ngọc Duy [off-list ref] wrote:
add_submodule_odb() can be used to import objects from another
repository temporarily. After this point we don't know which objects
are ours, which are external. If we create an object that refers to an
external object, next time git runs, it may find a hole in the object
graph because the external repository may not be imported. The same
goes for pointing a ref to an external SHA-1.

To protect ourselves, once add_submodule_odb() is used:

 - trees, tags and commits cannot be created
 - refs cannot be updated
.. and soon after I pressed send, I realized I missed at least two
other places write should not be allowed:

 - index
 - reflog

But the general idea is probably more important than implementation
details at this stage.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help