Re: [PATCH 1/5] run-command: add preliminary support for multiple hooks
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 25, 2019, 10:04 UTC
- Message-ID
- <xmqqwojiwgd4.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <87lfzys9t1.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 5 quoted lines
> To me this is another point in favor of bypassing this problem entirely > and adopting the semantics GitLab (and it seems others) use. I.e. in > order execute: > > .git/hooks/pre-receive .git/hooks/pre-receive.d/*
But isn't that exactly what Brian wanted to avoid? Consider those who run the current version of Git (which considers pre-receive.d/ is just a floating cruft Git does not care), with their own implementation of pre-receive hook that goes over the contents of pre-receive.d/ directory and executes each in order. If a new version of Git you release runs pre-receive followed by each of the files in pre-receive.d/ directory, especially because you designed to use *.d convention to match existing practice, doesn't your new version of Git end up running the scripts in *.d directory twice?