edisonywh / committee

️⚡️ Supercharged git hooks manager in pure Elixir
MIT License
62 stars 6 forks source link

When uninstalling hooks, the .committee file is deleted #29

Open scorsi opened 4 years ago

scorsi commented 4 years ago

I think the file shouldn't be deleted but maybe moved to .committee.backup.exs, we can add an option to committee.uninstall like --delete to delete the hooks file.

I did lost my hooks while testing them because before committing it I wanting to just deactivate committee by running mix committee.uninstall.

From my point of you, a config file shouldn't be deleted while uninstalling/removing, instead it depends of the user to do it or not.

Maybe it's just me ^^

Thanks

edisonywh commented 4 years ago

The idea of uninstall is to fully uninstall committee for the user, leaving a .backup.exs is going to be against that. If anything, a --backup flag to uninstall would be probably more realistic.

But, as for whether or not to remove a config file upon uninstallation, I think that is still up for discussion, though I don't really see the benefits of one vs the other.

However, when you said this:

I did lost my hooks while testing them because before committing it I wanting to just deactivate committee by running mix committee.uninstall.

Can you elaborate what you mean? Do you just want to skip the hook for a certain actions? In that case you can just pass in --no-verify, that should work. The docs could probably use some update in this regard.