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
Junio C Hamano <junkio@cox.net>
Date
Mar 24, 2007, 10:41 UTC
Message-ID
<7vodmikjol.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20070324102652.GA15474@thunk.org>
Theodore Tso <tytso@mit.edu> writes:
Show 11 quoted lines
> On Sat, Mar 24, 2007 at 08:14:31AM +0000, Andy Parkins wrote:
>> So: ideally, what /I/ would like is that git distributes the script in a 
>> standard location like /usr/share/doc/git/contrib/post-receive-emailer 
>> with the execute bit already set; that can be easily linked to or 
>> called from the actual post-receive hook.
>
> I wonder if this is a good idea to do for all or most of the template
> scripts, so that they can get automatically updated when git is
> updated, instead of having the problem we had before where the hook
> script got updated to match changes in git, but ancient repositories
> would still have the old script.

I do agree that dealing with ancient scripts that casually used implementation details that later versions broke is a problem.

But the recent updates to the mail-hook are backward compatible only in the sense that as long as the user configures it, the new script can mimic old version's behaviour (in other words, it was not backward compatible at all). I think forcing updates to the hooks automatically is worse. I'd rather keep hooks private to repository owner's concern.

While I think it would be great to have a central clearinghouse for people to share and enjoy useful hook collections for various workflows and use cases, I do not necessarily think inside git.git project itself is the best place to do so.

Previous: Theodore TsoNext: Andy Parkins
Message 7 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.