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

Re: What about allowing multiple hooks?

From
MKmartin f krafft <madduck@madduck.net>
Date
Nov 21, 2008, 13:55 UTC
Message-ID
<20081121135507.GA24516@piper.oerlikon.madduck.net>
In-Reply-To
<20081121133828.GB5912@gmx.de>
also sprach Marc Weber <marco-oweber@gmx.de> [2008.11.21.1438 +0100]:
Show 8 quoted lines
> So what about allowing (or even enforcing) ths directory layout?
> 
> .git/hooks/pre-commit/hook1.sh
> .git/hooks/pre-commit/hook2.sh
> .git/hooks/pre-commit/topGitcheck.sh
> 
> instead of
> .git/hooks/pre-commit # <- the one and only pre-commit hook

If you do this, I strongly suggest .git/hooks/pre-commit.d, and to use .git/hooks/pre-commit to invoke it, which adds to transparency. Debian does this all over the place. You need to ignore backup files and/or only execute *.hook files, to be able to have other files in there. Or the +x flag, as it is used now.

> The hook direcotry list apporach is better because you've more
> control about order of execution..
It's also way more transparent and natural.
-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
"america may be unique in being a country which has leapt
 from barbarism to decadence without touching civilization."
                                                        -- john o'hara
 
spamtraps: madduck.bogus@madduck.net
Previous: Marc WeberNext: Rogan Dawes
Message 2 of 10 in “What about allowing multiple hooks?”
  1. Marc WeberNov 21, 2008
  2. martin f krafftNov 21, 2008
  3. Rogan DawesNov 21, 2008
  4. Alexander PotashevJan 3, 2009
  5. Junio C HamanoJan 4, 2009
  6. Anders WaldenborgJan 21, 2009
  7. Johannes SchindelinJan 21, 2009
  8. Anders WaldenborgJan 21, 2009
  9. Johannes SchindelinJan 21, 2009
  10. Anders WaldenborgJan 22, 2009

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.