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

Exact format of tree objets

From
Chico Sokol <chico.sokol@gmail.com>
Date
Jun 11, 2013, 16:25 UTC
Message-ID
<CABx5MBRAYmO39BnMqnHZhUOwQf-7yeRuD=m7-P2xXdhkp6aWpA@mail.gmail.com>

Is there any official documentation of tree objets format? Are tree objects encoded specially in some way? How can I parse the inflated contents of a tree object?

We're suspecting that there is some kind of special format or encoding, because the command "git cat-file -p <sha>" show me the expected output, something like:

100644 blob 2beae51a0e14b3167fd7e81119972caef95779f4 .gitignore 100644 blob 7c817960e954f0278a6eee8d58611f61445167e8 LICENSE.txt 100644 blob 30e849cba985d74bfd29696f6dee5a40abaacb03 README ...

While "git cat-file tree <sha>" generate an strange output, which indicate some kink of encoding problem. Something like:

100644 .gitignore+��▒����,��Wy�100644 LICENSE.txt|�y`�T�'�n��XaaDQg�100644 README0�I˩��K�)

Thanks,

-- Chico Sokol

Next: Ilari Liusvaara
Message 1 of 7 in “Exact format of tree objets”
  1. Chico SokolJun 11, 2013
  2. Ilari LiusvaaraJun 11, 2013
  3. Chico SokolJun 18, 2013
  4. Thomas RastJun 18, 2013
  5. Junio C HamanoJun 11, 2013
  6. Jakub NarebskiJun 12, 2013
  7. Chico SokolJun 18, 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.