I was going to implement a patch to services/email.rb because I'd like to see the diff and diffstat in the email delivered to my mailing list, but I realized that the payload received doesn't have this information. It only lists which files have been added/removed/modified.
Would it be reasonable to get the hook to do something equivalent to running git diff --stat and, provided the diff is smaller than a certain threshold, get the diff itself and include it in the email? If yes, how do you think I should go about doing this? I doubt I can actually invoke git from the hook...
git diff --stat
I think the best bet for this is a 3rd party OAuth application.