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

Re: Understanding Git Under The Hood: Trees

From
EBErik Bernoth <erik.bernoth@gmail.com>
Date
Aug 15, 2013, 19:32 UTC
Message-ID
<CAB46HOmVpMFsu9dWwB+TZW+DQmE-5XOZqJf62Ufz7ak0eGxP5g@mail.gmail.com>
In-Reply-To
<7vwqnmrhbw.fsf@alter.siamese.dyndns.org>
On Thu, Aug 15, 2013 at 7:31 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> While the last statement applies to other parts of the system, it is
> not true for the in-core index design.  We always had a flat index,
> and it is not cheating at all.  The original "tree" was also a flat
> representation of everything under the sun, and hierarchical tree
> objects came much later.

To some degree that revalidates my interpretation of Andreas' statements. If I understand it correctly eacht time a shell command is executed, which requires tree interaction, the corresponding tree is read from filesystem to memory completely before anything is done? So if I git-add a file, the whole index is read first, then the memory object is changed and then the resulting change is written to disk bottom-up from the point of view of the tree?

Previous: Junio C HamanoNext: Andreas Ericsson
Message 4 of 6 in “Understanding Git Under The Hood: Trees”
  1. Erik BernothAug 15, 2013
  2. Andreas EricssonAug 15, 2013
  3. Junio C HamanoAug 15, 2013
  4. Erik BernothAug 15, 2013
  5. Andreas EricssonAug 16, 2013
  6. Erik BernothAug 16, 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.