From a cursory glance though, it doesn't seem to support reading packfiles. This was the big thing that prevented me from using a fully custom Git implementation when I wrote my git churn calculator[2]. For larger repositories, it seems that almost all files are stored in packfiles, rather than the conceptually simpler "loose" format.
For me, the most valuable resource was reading the Git / libgit2 source and reference documentation.
“How to Use: 1. Don’t”
LOL. Thanks! Both interesting!
There is also write you a git: https://wyag.thb.lt/
The tutorial on git is super cool, but for me the thought of constructing my own tutorials using a framework that got you here is even cooler.
Good choice, well explained. More than a toy problem space but stripped of factors that obscure the lesson. The author knows what they are doing.
Yes! I'm going to adopt that wording. Originally I tried to do a screencast about guided Git source code exploration but it didn't work because of that reason.
This is a pure python implementation that started simple (just read a couple of files from the .git folder) but after a little I understood that for non trivial repos you'll need to deal with pack for files. Because I had already published the package I actually completed the pack parsing work but I have to confess that it's way too complex and I wouldn't have started the project if I knew better...
In any case the source is there if you want to take a look!
But I have to wonder if you actually had anyone (else!) successfully _use_ this to further their understanding of git?
Generally, for me, it's either myself doing the exercise unguided, reading the documentation on internals, or reading the original source code. So I am certain it was a huge benefit for you, but it's more of a question on the approach being used with "students" and how successful would it be?
I didn't try teaching Git internals using code before, but I hypothesized it would be a good idea, and here is the result :) I'm curious about its effectiveness as well.
I have used git now for about 10 years, always via cli so I am pretty fluent with it and understand intuitively what is going on behind the scenes, but have only rarely needed to venture into the .git folders.
Working through the steps in this tutorial is helping to give a foundation to that intuition. I love the presentation format and would like to see more like this, and in other languages.
Is the tutorial itself available on github or elsewhere?
[1] relevant xkcd: https://xkcd.com/1597/