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

2016-04-26 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 26, 2016 at 9:16 PM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > +The path can either be absolute or relative. In the latter case see +the discussion in the "DESCRIPTION" section of linkgit:githooks[5] +about what the relative path will be relative to. >>>

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

2016-04-26 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: >>> +The path can either be absolute or relative. In the latter case see >>> +the discussion in the "DESCRIPTION" section of linkgit:githooks[5] >>> +about what the relative path will be relative to. >> >> ... which does not seem to appear there, it seems? > > I th

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

2016-04-26 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 25, 2016 at 10:33 PM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> +core.hooksPath:: >> + By default Git will look for your hooks in the >> + '$GIT_DIR/hooks' directory. Set this to different path, >> + e.g. '/etc/git/hooks', and Git will try to find your

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

2016-04-25 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > +core.hooksPath:: > + By default Git will look for your hooks in the > + '$GIT_DIR/hooks' directory. Set this to different path, > + e.g. '/etc/git/hooks', and Git will try to find your hooks in > + that directory, e.g. '/etc/git/hooks/pre-receiv

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

2016-04-25 Thread Johannes Sixt
Am 24.04.2016 um 23:18 schrieb Ævar Arnfjörð Bjarmason: +test_expect_success 'set up a pre-commit hook in core.hooksPath' ' + mkdir -p .git/custom-hooks .git/hooks && + write_script .git/custom-hooks/pre-commit <>.git/PRE-COMMIT-HOOK-WAS-CALLED +EOF + cat >.git/hooks/pre-commit

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

2016-04-25 Thread Ævar Arnfjörð Bjarmason
On Sun, Apr 24, 2016 at 11:18 PM, Ævar Arnfjörð Bjarmason wrote: > 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 templa

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

2016-04-24 Thread Ævar Arnfjörð Bjarmason
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 ca