Skip to content
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

always run git-hooks installation script #1751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jashandeep-sohi
Copy link
Contributor

To keep .pre-commit-config.yaml in sync when all hooks are disabled

#1748

@sandydoo
Copy link
Member

sandydoo commented Feb 26, 2025

Thanks for tacking this, @jashandeep-sohi.

I'm worried that we'll get a lot of complaints from users asking why git-hooks:install is running and why they now have a .pre-commit-hooks.yaml file in their repo when they haven't enabled the integration.

It might make sense for now to add a few lines to enterShell that: tests for .pre-commit-hooks.yaml, looks for "# This file was generated by git-hooks.nix" (or "pre-commit-hooks.nix"), and removes it.

It'd be nice to have some type of "uninstall" task that wouldn't be logged if it didn't run. But that seems out of scope for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants