devenv
devenv copied to clipboard
Remove all hooks from .pre-commit-config.yaml if disabled
While in the shell, I occasionally like to use the pre-commit CLI directly.
This works well, expect when you disable git-hooks.
In that case, .pre-commit-config.yaml goes out of sync, because currently it is only updated if at least one pre-commit hook is enabled https://github.com/cachix/devenv/blob/74832581642f2a59f0c2a5b74c6ef221080f3c39/src/modules/integrations/git-hooks.nix#L43
Would it be possible to always run https://github.com/cachix/devenv/blob/74832581642f2a59f0c2a5b74c6ef221080f3c39/src/modules/integrations/git-hooks.nix#L49 to make sure all disabled hooks are removed?
Would love to get this fixed, happy to accept a PR!
We should probably just remove the file if there are no hooks and the file is a symlink to the store
This was fixed in https://github.com/cachix/devenv/pull/1751