Re: What about allowing multiple hooks?
- From
- martin 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