Re: [PATCH v2 7/7] docs: document multiple hooks
- Date: Tue, 14 May 2019 20:38:06 +0700
- From: Duy Nguyen <pclouds@xxxxxxxxx>
- Subject: Re: [PATCH v2 7/7] docs: document multiple hooks
On Tue, May 14, 2019 at 7:24 AM brian m. carlson
> +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/<hook> is a directory
and use it instead of hooks/<hook>.d? 
The only advantage of <hook>.d that I can see is if we support some
sort of combination of <hook> and <hook>.d.
 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).
> `git init` may copy hooks to the new repository, depending on its
> configuration. See the "TEMPLATE DIRECTORY" section in
> linkgit:git-init for details. When the rest of this document refers