Re: Understanding Git Under The Hood: Trees

2013-08-16 Thread Andreas Ericsson
On 2013-08-15 21:32, Erik Bernoth wrote: On Thu, Aug 15, 2013 at 7:31 PM, Junio C Hamano gits...@pobox.com wrote: 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

Re: Understanding Git Under The Hood: Trees

2013-08-16 Thread Erik Bernoth
Hi Andreas, you gave me a lot of new insight and keywords I can google (Junio as well!). Thanks a lot! On Fri, Aug 16, 2013 at 11:12 AM, Andreas Ericsson a...@op5.se wrote: More or less, yes, but please don't confuse directory tree with git tree. They're not the same. A directory tree can

Re: Understanding Git Under The Hood: Trees

2013-08-15 Thread Andreas Ericsson
On 2013-08-15 12:29, Erik Bernoth wrote: Hi, I'm currently trying to understand the inner workings of git better by writing a git clone in Python. I find it rather hard to understand how to efficiently use trees. What I understand is this: Trees are in essence blobs with a specific content.

Re: Understanding Git Under The Hood: Trees

2013-08-15 Thread Junio C Hamano
Andreas Ericsson a...@op5.se writes: You seem to believe that the in-memory representation of trees have to be the same as the on-disk one. That's simply not true. Git cheats outrageously with internal formats for pretty much everything in order to squeeze out more performance. While the

Re: Understanding Git Under The Hood: Trees

2013-08-15 Thread Erik Bernoth
On Thu, Aug 15, 2013 at 7:31 PM, Junio C Hamano gits...@pobox.com wrote: 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