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

Re: [PATCH] update-hook: remove all functionality that should be in hooks/post-receive

From
FMFrancis Moreau <francis.moro@gmail.com>
Date
Mar 24, 2007, 18:15 UTC
Message-ID
<38b2ab8a0703241115q39dc298clb15357268288b49e@mail.gmail.com>
In-Reply-To
<200703241548.13775.andyparkins@gmail.com>
On 3/24/07, Andy Parkins <andyparkins@gmail.com> wrote:
Show 18 quoted lines
> On Saturday 2007, March 24, Francis Moreau wrote:
>
> > Are there any simple ways to enable this behaviour from your hooks ?
>
> Yes; have a look near the bottom of the post receive hook (update to
> come today, so don't use it yet), but you'll see:
>
>  while read oldrev newrev refname
>  do
>   generate_email $oldrev $newrev $refname | /usr/sbin/sendmail -t
>  done
>
> That pipe to send mail could be anything you want, say
>
>  generate_email >> /var/www/update-announcements.txt
>
> Would that suit you?
>

yes that almost would do the thing. But instead of hacking the hook, it would be great to have a trivial setup at the begining of the script to choose this config.

Maybe a local config in the repo through the command `git config` could do the job ?

$ git config hook.update.path "/var/www/"

And if the config is to write the message to a file, skip the email stuffs generation (header, foorter...).

thanks
-- 
Francis
Previous: Andy ParkinsNext: Andy Parkins
Message 12 of 15 in “update-hook: remove all functionality that should be in hooks/post-receive”
  1. update-hook: remove all functionality that should be in hooks/post-receiveAndy Parkins, Mar 23, 2007
  2. Junio C HamanoMar 24, 2007
  3. Linus TorvaldsMar 24, 2007
  4. Shawn O. PearceMar 24, 2007
  5. Andy ParkinsMar 24, 2007
  6. Theodore TsoMar 24, 2007
  7. Junio C HamanoMar 24, 2007
  8. Andy ParkinsMar 24, 2007
  9. Theodore TsoMar 24, 2007
  10. Francis MoreauMar 24, 2007
  11. Andy ParkinsMar 24, 2007
  12. Francis MoreauMar 24, 2007
  13. Andy ParkinsMar 25, 2007
  14. Shawn O. PearceMar 25, 2007
  15. Francis MoreauMar 25, 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.