royriojas / precommit

A precommit script that will execute certain tasks only on the files that were added to the git index stashing the other ones to avoid false positives when running validation tasks
MIT License
5 stars 2 forks source link

Direct coverage of pre-commit problem #4

Open xuexb opened 8 years ago

xuexb commented 8 years ago

Before I had thought about how to handle the git hook, because .git directory is not under version control, see your precommit, really good, but I just found that when using: When I installed directly covering my pre-commit file,You should check whether a file exists under it. Also when I remove pre-commit will delete the file directly, but no judge is not precommit generated files, thank you ~


Google translation from the above, please forgive me not English ~ thanks

royriojas commented 8 years ago

Hi @xuexb just to make sure what you're asking is:

  1. To provide a warning to let the user know that the existing precommit hook will be deleted?
  2. To just backup the current precommit to other file and create the new one?
  3. To just document that the original file will be overriden?

Please let me know to understand better what is required to do as part of this issue.

xuexb commented 8 years ago

hi, am glad to see your reply, I just described above under my doubts, because if I itself is a pre-comment hook, if you use the install, remove or can be prompted to confirm it will be more friendly, I personally tendency in:

To provide a warning to let the user know that the existing precommit hook will be deleted?

Thank you ~

royriojas commented 8 years ago

cool man will add a warning to let the user know the existing precommit hook will be deleted. Thanks!