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.