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

[silly] loose, pack, and another thing?

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 27, 2023, 04:15 UTC
Message-ID
<xmqqbkdometi.fsf@gitster.g>

Just wondering if it would help to have the third kind of object representation in the object database, sitting next to loose objects and packed objects, say .git/objects/verbatim/<hex-object-name> for the contents and .git/objects/verbatim/<hex-object-name>.type that records "blob", "tree", "commit", or "tag" (in practice, I would expect huge "blob" objects would be the only ones that use this mechanism).

The contents will be stored verbatim without compression and without any object header (i.e., the usual "<type> <length>\0") and the file could be "ln"ed (or "cow"ed if the underlying filesystem allows it) to materialize it in the working tree if needed.

"fsck" needs to be told about how to verify them. Create the object header in-core and hash that, followed by the contents of that file, and make sure the result matches the <hex-object-name> part of the filename, or something like that.

Next: Christian Couder
Message 1 of 7 in “[silly] loose, pack, and another thing?”
  1. Junio C HamanoSep 27, 2023
  2. Christian CouderSep 27, 2023
  3. Jonathan TanSep 28, 2023
  4. Jonathan TanSep 28, 2023
  5. Jeff KingOct 3, 2023
  6. Junio C HamanoOct 3, 2023
  7. Jeff KingOct 4, 2023

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.