how to set up e-mail notification?
- From
- Oliver Kullmann <o.kullmann@swansea.ac.uk>
- Date
- May 11, 2007, 19:55 UTC
- Message-ID
- <20070511195539.GF3491@cs-wsok.swansea.ac.uk>
Hello,
I have set up a Git repository as a shared repository as described in the CVS-to-Git conversion manual.
Now I want this shared Git repository to send out notification e-mails after commits, simulating what with CVS was achieved by adding to CVSROOT/loginfo the lines
--------------------- # CVS notifications to all users on commit ALL (echo ""; echo %{sVv}; date; cat) | mutt -s "OKlibrary CVS Commit -- $USER" e-mail-address_1 e-mail-address_2 ---------------------
Now I understand that I shall make
hooks/post-commit
executable, and then fill the file with some script which will send the e-mails: But apparently this script does not have any parameters, that is, no information is supplied to it?
So the idea is to write some program which reads the last commit and extracts the information from the git-repository, and sends the e-mail?
Now I would guess many others have already solved that task, and so I would be glad it they could tell me such a little script (standard Linux environment).
Thanks in any case!
Oliver