{"thread":{"id":"8086","subject":"how to set up e-mail notification?","startedAt":"2007-05-11T19:55:39Z","lastAt":"2007-05-12T20:11:43Z","messageCount":3,"participants":["Oliver Kullmann","Julian Phillips"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"41853","messageId":"20070511195539.GF3491@cs-wsok.swansea.ac.uk","threadId":"8086","inReplyTo":null,"subject":"how to set up e-mail notification?","fromName":"Oliver Kullmann","fromEmail":"o.kullmann@swansea.ac.uk","sentAt":"2007-05-11T19:55:39Z","receivedAt":"2007-05-11T19:55:39Z","isPatch":false,"sender":{"key":"o.kullmann@swansea.ac.uk","avatar":null},"body":"Hello,\n\nI have set up a Git repository as a shared repository as described in\nthe CVS-to-Git conversion manual.\n\nNow I want this shared Git repository to send out notification e-mails\nafter commits, simulating what with CVS was achieved by\nadding to CVSROOT/loginfo the lines\n\n---------------------\n# CVS notifications to all users on commit\nALL (echo \"\"; echo %{sVv}; date; cat) | mutt -s \"OKlibrary CVS Commit \n-- $USER\" e-mail-address_1 e-mail-address_2 \n---------------------\n\nNow I understand that I shall make\n\nhooks/post-commit\n\nexecutable, and then fill the file with some script which will send\nthe e-mails: But apparently this script does not have any parameters,\nthat is, no information is supplied to it?\n\nSo the idea is to write some program which reads the last commit and extracts\nthe information from the git-repository, and sends the e-mail?\n\nNow I would guess many others have already solved that task, and so I would\nbe glad it they could tell me such a little script (standard Linux environment).\n\nThanks in any case!\n\nOliver\n"},{"id":"41887","messageId":"Pine.LNX.4.64.0705120232320.30969@beast.quantumfyre.co.uk","threadId":"8086","inReplyTo":"20070511195539.GF3491@cs-wsok.swansea.ac.uk","subject":"Re: how to set up e-mail notification?","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-05-12T01:35:11Z","receivedAt":"2007-05-12T01:35:11Z","isPatch":false,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"On Fri, 11 May 2007, Oliver Kullmann wrote:\n\n> Hello,\n>\n> I have set up a Git repository as a shared repository as described in\n> the CVS-to-Git conversion manual.\n>\n> Now I want this shared Git repository to send out notification e-mails\n> after commits, simulating what with CVS was achieved by\n> adding to CVSROOT/loginfo the lines\n\n...\n\n> Now I would guess many others have already solved that task, and so I would\n> be glad it they could tell me such a little script (standard Linux environment).\n\nThere's one in the standard git source tree: \ncontrib/hooks/post-receive-email\n\nnever used it myself ...\n\n-- \nJulian\n\n  ---\nZoe: \"Are those grenades?\"\n\nJayne: \"Cap'n doesn't want 'em.\"\n\nZoe: \"We're robbing the place.  We're not occupying it.\"\n"},{"id":"41962","messageId":"20070512201143.GJ3491@cs-wsok.swansea.ac.uk","threadId":"8086","inReplyTo":"Pine.LNX.4.64.0705120232320.30969@beast.quantumfyre.co.uk","subject":"Re: how to set up e-mail notification?","fromName":"Oliver Kullmann","fromEmail":"o.kullmann@swansea.ac.uk","sentAt":"2007-05-12T20:11:43Z","receivedAt":"2007-05-12T20:11:43Z","isPatch":false,"sender":{"key":"o.kullmann@swansea.ac.uk","avatar":null},"body":"> \n> There's one in the standard git source tree: \n> contrib/hooks/post-receive-email\n> \n> never used it myself ...\n> \n\nThanks! That script looks quite complicated, so as a quick\nsolution I just added to hooks/post-receive the line\n\nmutt -s \"Git push Repository-Name -- $USER\" e-mail-addresses\n\nso that at least the users see that something happened, and\nI'll investigate contrib/hooks/post-receive-email.\n\nOliver\n"}]}