The normal mode sets localcore.hooksPath on git hooks install in a repository and will not do any automatic installation on clone/init.
The centralized mode sets this globally and will work by default for all clone/init repos.
More changes:
Run-wrappers can still be installed in local repos, init.templateDir is not used and controlled by Githooks anymore.
Run-wrapper will use by default githooks-runner and as fallback use git config githooks.runner. Package manager builds tag: package_manager_enabled will not set this.
The installer has an option --hooks-dir which specifies the directory to place the maintained hooks.
The installer has an option --hooks-dir-use-template-dir in non---centralized mode which looks for a set GIT_TEMPLATE_DIR or init.templateDir or the Git default directory. This option is not encouraged, and will install templates on each init/clone as before.
The installer warns if the chosen hooks dir during install is pointing to a template directory used by Git.
User wanting to install run-wrappers instead of setting core.hooksPath should either use git hooks install --maintained-hooks or place a file <template-dir>/hooks/githooks-contains-run-wrappers to let Githooks know that this repo maintains run-wrappers (for updates etc, that no core.hooksPath is used but run-wrappers installed directly).
Registering is now done for all repositories (also in centralized mode).
git hook uninstall --full and git hooks uninstaller --full-uninstall-from-repos will clean all Git config and cached settings (checksums) in registered repositories, by default git hooks uninstall will not remove locally set githooks.* Git config variables, this is to make reinstallation more easy, e.g. githooks.maintainedHooks stays and will be read on reinstall.
coverage: 77.882% (-2.3%) from 80.215%
when pulling f24599f59b88022345a1b6f6a51f16277c7e1d63 on feature/remove-all-unnecessary-install-modes
into 116356a27cabdb23e0b4545788c52117b38e7a87 on main.
Fixes: #152.
Two modes::
core.hooksPath
ongit hooks install
in a repository and will not do any automatic installation on clone/init.More changes:
Run-wrappers can still be installed in local repos,
init.templateDir
is not used and controlled by Githooks anymore.Run-wrapper will use by default
githooks-runner
and as fallback usegit config githooks.runner
. Package manager buildstag: package_manager_enabled
will not set this.The installer has an option
--hooks-dir
which specifies the directory to place the maintained hooks.The installer has an option
--hooks-dir-use-template-dir
in non---centralized
mode which looks for a setGIT_TEMPLATE_DIR
orinit.templateDir
or the Git default directory. This option is not encouraged, and will install templates on each init/clone as before.The installer warns if the chosen hooks dir during install is pointing to a template directory used by Git.
User wanting to install run-wrappers instead of setting
core.hooksPath
should either usegit hooks install --maintained-hooks
or place a file<template-dir>/hooks/githooks-contains-run-wrappers
to let Githooks know that this repo maintains run-wrappers (for updates etc, that nocore.hooksPath
is used but run-wrappers installed directly).Registering is now done for all repositories (also in centralized mode).
git hook uninstall --full
andgit hooks uninstaller --full-uninstall-from-repos
will clean all Git config and cached settings (checksums) in registered repositories, by defaultgit hooks uninstall
will not remove locally setgithooks.*
Git config variables, this is to makereinstallation
more easy, e.g.githooks.maintainedHooks
stays and will be read on reinstall.