From: Duy Nguyen Date: Tue, 14 May 2019 13:38:06 GMT Subject: Re: [PATCH v2 7/7] docs: document multiple hooks Message-ID: In-Reply-To: <20190514002332.121089-9-sandals@crustytoothpaste.net> On Tue, May 14, 2019 at 7:24 AM brian m. carlson wrote: > +It is possible to provide multiple hooks for a single function. If the > +main hook file is absent, If I remember 1/7 correctly, if the hook "file" is a directory, you ignore it and check for hook.d too. Which makes me think, can we just check if hooks/ is a directory and use it instead of hooks/.d? [1] The only advantage of .d that I can see is if we support some sort of combination of and .d. [1] Of course if you're really strict on backward compatibility then this is out of question. > hooks are additionally looked for in a > +directory with the name of the main hook file with a `.d` appended. > +(That is, if `post-receive` is missing, `post-receive.d` is inspected > +for any hooks that might be present.) Each of these hooks is executed in order, > +sorted by file name. By default, if a hook fails, additional hooks are not > +executed, but this can be controlled with the `hook.*.errorBehavior` setting > +(see linkgit:git-config[1]). > + > `git init` may copy hooks to the new repository, depending on its > configuration. See the "TEMPLATE DIRECTORY" section in > linkgit:git-init[1] for details. When the rest of this document refers -- Duy