How to get Gerrit's Code Review to output email diffs on successful commit?
Question
Right now it just shows:
M test.txt
1 file changed, 1 insertion(+), 0 deletions(-)
Previously we used git-commit-notifier to have nice colored diffs in our developer mailing list (this is a post-receive hook) when we were using Gitolite.
I could set it up the same in the Gerrit instance but then we'd be using two different mail mechanisms, email templates, and double emails on successful merges.
Solution
Sean Pearce, a developer on the project answered my question on Google Groups. He suggested plugging into the change-merged hook on your server:
http://gerrit.googlecode.com/svn/documentation/2.2.0/config-hooks.html#_change_merged
Then, as the callback use git-commit-notifier.
OTHER TIPS
It looks like currently it's not possible using the standard gerrit e-mails or e-mail templates.
Gal Hammer proposed a patch in this thread: http://groups.google.com/group/repo-discuss/browse_thread/thread/fa514efd491703d8/c0c1762d3fdd1588 but it's not currently merged into trunk.
I think it's not even submitted following the standard patch submit process so it can take a while before somebody takes that code and pushes it to trunk.
You can see the Mauvis Ledford answer for an alternative solution.
From Gerrit 2.6 it will be possible to make the "change merged" notification email include the commit's unified diff.