Commit email notification script.
Commit email notification script.

Copied verbatim from
/usr/share/doc/git-core/contrib/hooks/post-receive-email on an Ubuntu
9.10 install (with Git 1.7.1 installed via .deb packages from
git-scm.com).

This script is present in the "hooks" directory of the Mifos head
repository at sf.net. Other repositories which should send notifications
when commits are received (pushed by committers to sf.net) should
symlink to the script in head/hooks. For example:

(shell in to sf.net)
$ cd /home/scm_git/m/mi/mifos/REPOSITORY/hooks
$ ln -s /gitrepo/m/mi/mifos/head/hooks/post-receive

Note the differing paths seen when shelled in, and (apparently) when a
hook script is executing.

After installing the script, here are two commands I ran (by hand, in
each repo, on sf.net shell) to configure our mailing list and gitweb
setup:

git config hooks.mailinglist commits@mifos.dev.java.net

git config hooks.showrev "t=%s; r=\`basename \$PWD\`; printf 'http://mifos.git.sourceforge.net/git/gitweb.cgi?p=mifos/%%s;a=commit;h=%%s' \$r \$t; echo;echo; git rev-list -1 --pretty \$t"

maduhu/head,maduhu/mifos-head,AArhin/head,jpodeszwik/mifos,maduhu/mifos-head,vorburger/mifos-head,AArhin/head,maduhu/head,maduhu/head,AArhin/head,maduhu/mifos-head,jpodeszwik/mifos,AArhin/head,jpodeszwik/mifos,maduhu/head,vorburger/mifos-head,jpodeszwik/mifos,maduhu/mifos-head,vorburger/mifos-head,maduhu/head,AArhin/head,vorburger/mifos-head,maduhu/mifos-head