Re: What about allowing multiple hooks?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



also sprach Marc Weber <marco-oweber@xxxxxx> [2008.11.21.1438 +0100]:
> 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@xxxxxxxxxxx

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux