anolson/git_diff — pull request #4 by anolson (2014-01-26 19:25:36+00:00)
Title: Stats support.

This adds stats calculations for `Diff`, `File`, and `Hunk`.

The currently available stats are:

* `number_of_additions`
* `number_of_deletions`
* `number_of_lines`

Stats are collected with a collector object (that implements `collect`) and then calculated with `StatsCaclulator`. The only calculation currently performed is `total`. `StatsCalculator` is flexible enough, so it could eventually support other calculations (e.g. percentages, averages, etc).

Stats are initially collected with `StatsCollector::Hunk`. These totals are then rolled up for `Diff` and `File` stats with `StatsCollector::Rollup`.