git/list[1] front-page[2] threads[3] people[4] search[5] about
 

how to set up e-mail notification?

From
OKOliver 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
Next: Julian Phillips
Message 1 of 3 in “how to set up e-mail notification?”
  1. Oliver KullmannMay 11, 2007
  2. Julian PhillipsMay 12, 2007
  3. Oliver KullmannMay 12, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.