The code was done over several quick sessions (there's a visualisation of that in the link above) so it's really scrappy, but it pulls out the timestamps of a programmers commits and presents that in several different formats. It uses Github API or just SVN log.
Cool, never used hg, thanks.
Git might have a module; I've never seen it if it does.
However, having it separate to git means we can pull in other data to build up a complete picture of the users activity - the comments made in an issue tracker for instance.
That's a perfectly fine solution, but not exactly what I want. With this solution I would have to keep a list of repositories up to date. And in order to update my data I would always need to clone every repository, run the command and put all numbers together.
I like automation, so I looked for a different solution.
Fair enough. I wouldn't consider having a clone of the repo to be a blocker. You could very easily automate the cloning, reporting, deleting of a repo.
That's true. A big advantage of this solution over, let's say a self written post-commit hook, is the past. It doesn't matter when you start collecting this data, thanks to Git you will have data about yourself from the past. With a post-commit hook that's not the case.
I'm still not sure what's the best way to go, but thanks for your comments!
But then it's just a list of dates and its hard to see any patterns - that was my motivation ... I wanted graphs, iCal data you can put on a calendar and so on.
Using my command I showed above I get the following output:
2791 Ryan Funduk
Still, yea, if you want data you could put on a calendar then I would instead suggest `git log` with `pretty-format` which you could then parse pretty easily.
Ahh, sorry, I wasn't familiar with the shortlog command.
I still want to be able to pick out patterns in the data tho. Getting the data out is only half the battle, then you have to be able to pick out something interesting in it.
If you see my other comment here, I already wrote some scripts that pulled timestamps into iCal files and graphs.
The question is how does he get all the data? I have a bash function that does a git commit, and sends off the message / repo name to a webserver that provides a reasonable interface for it.
http://jarofgreen.co.uk/2011/04/introducing-creepycoder/
The code was done over several quick sessions (there's a visualisation of that in the link above) so it's really scrappy, but it pulls out the timestamps of a programmers commits and presents that in several different formats. It uses Github API or just SVN log.
https://github.com/jarofgreen/CreepyCoder
I agree with you that LOC is not really a great metric.
Next I was going to look at separating variables in the data & comparing them - eg, see two programmers commit habits side-by-side.
I've also been to a talk by a company that pulled stats from commit logs, will try to find it and post it.