git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] hooks: Add ability to specify where the hook directory is

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 25, 2016, 14:19 UTC
Message-ID
<CACBZZX6T-vmgbMTyrbU+228mQoRFzgCjkV13uiQyedmc8SfyAg@mail.gmail.com>
In-Reply-To
<1461532702-4045-1-git-send-email-avarab@gmail.com>

On Sun, Apr 24, 2016 at 11:18 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 24 quoted lines
> Change the hardcoded lookup for .git/hooks/* to optionally lookup in
> $(git config core.hooksPath)/* instead.
>
> This is essentially a more intrusive version of the git-init ability to
> specify hooks on init time via init templates.
>
> The difference between that facility and this feature is that this can
> be set up after the fact via e.g. ~/.gitconfig or /etc/gitconfig to
> apply for all your personal repositories, or all repositories on the
> system.
>
> I plan on using this on a centralized Git server where users can create
> arbitrary repositories under /gitroot, but I'd like to manage all the
> hooks that should be run centrally via a unified dispatch mechanism.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>
> This is based off the githooks.txt series I just sent, I thought it
> made the most sense to address the questions the previous version
> raised about how we treat the working directory with unrelated
> githooks.txt doc improvements.
>
> This version also address all the other issues SZEDER Gábor noted.
This still applies cleanly on top of the v3 githooks.txt series I just sent.

I forgot to note one thing, when I re-rolled this I changed the configuration variable from core.hooksDirectory to core.hooksPath, everything else in config.txt that dealt with paths was *Path something, so I thought that made more sense for consistency.

Previous: Ævar Arnfjörð BjarmasonNext: Johannes Sixt
Message 5 of 10 in “hooks: Add ability to specify where the hook directory is”
  1. hooks: Add ability to specify where the hook directory isÆvar Arnfjörð Bjarmason, Apr 22, 2016
  2. SZEDER GáborApr 23, 2016
  3. Ævar Arnfjörð BjarmasonApr 23, 2016
  4. hooks: Add ability to specify where the hook directory isÆvar Arnfjörð Bjarmason, Apr 24, 2016
  5. Ævar Arnfjörð BjarmasonApr 25, 2016
  6. Johannes SixtApr 25, 2016
  7. Junio C HamanoApr 25, 2016
  8. Ævar Arnfjörð BjarmasonApr 26, 2016
  9. Junio C HamanoApr 26, 2016
  10. Ævar Arnfjörð BjarmasonApr 26, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.