Add diffstat formula

Closes #171.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>