I'm a big fan of Git, I'm using it daily. Every now and then I dive into Git's excellent source code. I've learned many things from it. I went so far as to extract Git's testing library and turned it into a separate project: Sharness.
Sharness is a portable shell library to write, run, and analyze automated tests for Unix programs. Check it out at http://mlafeldt.github.com/sharness