-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Remove all unnecessary install modes (#159)
**Two modes:**: - The normal mode sets **local** `core.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. **CI**: - Go 1.22 - Remove `EXTRA_INSTALL_ARGS` sed modifications and pass explicitly. - Disabled hanging test 064 (build from source) on windows. - Coverage also runs `--centralized` tests too.
- Loading branch information
Showing
200 changed files
with
2,921 additions
and
1,628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.