git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 23, 2013, 21:06 UTC
Message-ID
<7vwqv3fw2b.fsf@alter.siamese.dyndns.org>
In-Reply-To
<51004A37.6040301@web.de>
Jens Lehmann <Jens.Lehmann@web.de> writes:
> This is a false positive. The merge algorithm picked a fast-forward
> in a submodule as a proper merge result and records that in a
> gitlink. But as Duy pointed out this could be easily fixed by
> turning the readonly flag off in that case.

I see that as "easily circumvented and not an effective protection", though.

In theory, adding a gitlink to the index, removing a gitlink to the index and modifying an existing gitlink in the index to another gitlink in the index and writing the resulting in-core index out to the on-disk index should be allowed, even after objects from the submodule object database have contaminated our in-core object pool, as long as you do not run cache_tree_update(). I am not sure if that single loophole would be sufficient, though.

Previous: Jens LehmannNext: Duy Nguyen
Message 5 of 7 in “Revoke write access to refs and odb after importing another repo's odb”
  1. Revoke write access to refs and odb after importing another repo's odbNguyễn Thái Ngọc Duy, Jan 23, 2013
  2. Duy NguyenJan 23, 2013
  3. Junio C HamanoJan 23, 2013
  4. Jens LehmannJan 23, 2013
  5. Junio C HamanoJan 23, 2013
  6. Duy NguyenJan 24, 2013
  7. Duy NguyenJan 24, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.