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

Rename existing commit hooks #156

Open
nirvdrum opened this issue Jul 12, 2021 · 1 comment
Open

Rename existing commit hooks #156

nirvdrum opened this issue Jul 12, 2021 · 1 comment
Labels
enhancement New feature or request
Projects
Milestone

Comments

@nirvdrum
Copy link

Description

When rusty-hook is set up, it generates new git hook files and overwrites any hooks that may exist. Since git doesn't store hook files in its repo, undoing the changes made by rusty-hook generally mean restoring a file from backup. It would be helpful if rusty-hook, instead, renamed existing files (e.g., pre-commit -> pre-commit.bak) before replacing them.

Value

It may turn out that rusty-hook doesn't work well for a certain application. Removing it is a bit more involved now because the original hook files need to be recovered and restored. Even if one is to continue using rusty-hook, it'd be helpful to be able to consult the original hook file to see what additional checks might be enabled.

@calebcartwright calebcartwright added the enhancement New feature or request label Jul 13, 2021
@calebcartwright calebcartwright added this to the 1.0 Release milestone Jul 13, 2021
@calebcartwright calebcartwright added this to To do in 1.0 Release via automation Jul 13, 2021
@calebcartwright
Copy link
Member

That's a reasonable ask, thanks for the suggestion! I vaguely remember considering this during the initial implementation but it wasn't a high priority since it's relatively uncommon for folks to have manually-crafted hook files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
1.0 Release
  
To do
Development

No branches or pull requests

2 participants