How do I configure the appropriate git hook to send a summary email whenever a set of changes is pushed to the upstream repository?
You could add something like this to your post-receive hook in $GITDIR/hooks, or use the script in the contrib directory of the source (Available here)
The syntax for adding / customizing the script, for example for this particular purpose, is not crystal clear. I think both scripts are pretty multi-purpose, are they equivalent?
Anyway, thanks for the answer and link, I will sure be using it!
I managed to do this, but had to opt for using the contrib script, not the other (perl) script by Alexandre Julliard. It seems fancier and more configurable, but with postfix I had no mail command which would accept "-s"? Here's my way:
http://pastie.textmate.org/695323
It would be nice to show some more info, like the full patch, gitweb link and commit graph as well, but this script can only do the first - if I play around with hooks.showrev it seems.
Anyway, cheers and thanks for the suggestions!
setting hooks.showrev is making no distinguishable difference? :-/
Sample conf:
# less users/cj.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = true
[hooks]
mailinglist = [email protected]
showrev = "git show -C %s; echo"
emailprefix = "[sabu gitosis server] "
This is my way of send email notification to users every time some one push to the repository.
http://pkill.info/blog/post/setting-up-git-commit-email-notification.html
It's based on Andy Parkins's scripts. I change it to used SMTP to send email. Of course, gmail's SMTP can also be used.