Understanding Git Under The Hood: Trees

2013-08-15 Thread Erik Bernoth
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. The content is a relation between other blobs

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

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

Index Fileformat: stat(2) info necessary? What for?

2013-08-26 Thread Erik Bernoth
Hi, I am still working on implementing git in Python for self education purposes. Implementing the Index in memory was no problem after I understood how its done with help of Andreas Ericsson and Junio C Hamano. Now I want to store an Index state to the filesystem in a git-compatible file