swellaby / rusty-hook

git hook manager, geared toward Rust projects
MIT License
207 stars 11 forks source link

Investigate optimizing git hook scripts #60

Open calebcartwright opened 5 years ago

calebcartwright commented 5 years ago

Description

Currently, every single git hook runs the setup checks (does the cli exists, does it meet the minimum required version, etc.). We should investigate optimizing those checks to only run on the "initiating" hook that starts the respective git hook lifecycles

Value

Running those checks on every single hook is inherently duplicative and unnecessary. For example, if the pre-commit hook check validates those items, then there's really no need to re-run the valdiation checks on the post-commit hook; you can't hit the post-commit hook without first hitting the pre-commit hook.