views:

89

answers:

2

I've got a diff e-mail sending using Git's post-receive e-mail hook (thanks to this SO post) but the e-mail that it sends is just plain text. I'd like something a big more colorful and well formatted.

Is there a script or something I can run using the post-receive hook that will send a nicely formatted diff e-mail instead of the plain text one?

+1  A: 

You can try (not tested myself) this other post-receive email hook:

git-hook-update-notify-email

script for colorized emails on GIT commits. Use it in the "update" hook.

(ruby-based, also referenced in rubyforge.org)

VonC
+1  A: 

You can format your code using a syntax highlighter like Pygments. Using their commandline tool it should be easy to pipe your output into an html doc which can be embedded in the body of an email. I would figure you could do something like this but replace the command with your custom Pygments command.

dcolish
This was the way I ended up doing it. Hopefully I'll get around to posting my full solution as it was not very easy to figure out, but this pointed me in the right direction... Thanks!
cmcculloh