title: Storing code metrics
body: <p>I'd like to write a pre-commit hook that tells you if you've improved/worsened some code metric of a project (i.e. average function length). The hook would have to know what the previous average function length was and I don't know where to store that information. One option would be to store an additional <em>.metrics</em> file in the repo but that sounds clunky. Another option would be to <code>git stash</code>, compute the metrics, <code>git stash pop</code>, compute the metrics again and print the delta. I'm inclined to go with the latter. Are the any other solutions?</p>