git logto spit out some metrics.
git-iteratewas born: run anything through your entire project’s history, and get the results in something easily converted into a beautiful chart!
It does that by running
git-reset --hard $COMMITfor every commit in the repository, and then calling the script given to it as the first argument. It passes the commit ID to the script too, so this:
…will generate a list of all your commit IDs, most recent last.
The code is on GitHub, as usual. I’m running a few stats on some projects I have access to, and will upload a few charts as soon as they’re ready. Meanwhile, feel free to send me the output of this:
git-iterate 'echo `flog app` `flog spec`' # if needed, replace "spec" for "test"
…and I’ll chart those for comparison as well. Also, it shouldn’t be difficult to port git-iterate to other source control systems (all of them have a checkout command, right?) and, if you do that, make sure to plug it in the comments.
Have fun! :)
Update: fresh off the oven, here’s Rails’ total lines of code. Neat, huh?