-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use --no-auto-install
by default when executing run
hooks
#840
Comments
Hey @cgaube , there is a small nuance. You may change the global settings of the config which affect the script in the git hooks, so the sync is required. Lefthook also supports the flow when you only do Also nothing will be installed if not required because lefthook calculates the hashsum of the config file and skips syncing hooks if nothing changed in the main config file. So, this implicit installation step does not affect the execution time a lot, but reduces the need to manually install the hooks every time you change the configuration or add a new hook. |
Gotcha, this is indeed helpful. I would still love to be able to disable this behavior via configuration file though :) |
⚡ Summary
Hooks are triggered when executing git commands like
git commit
When lefthook is executed it automatically check if the hooks are installed
This is I believe useless as if the hooks were triggered it means the hooks are installed
#715
#716
Value
We stop doing things that we don't need to do :D
Behavior and configuration changes
When lefthook run is executed via a hook dont check if hook is installed
https://github.com/evilmartians/lefthook/blob/master/internal/lefthook/run.go#L96-L106
The text was updated successfully, but these errors were encountered: