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

Document the current capabilities and limitations of pre-commit hooks #237

Closed
grempe opened this issue Jul 1, 2015 · 2 comments
Closed

Comments

@grempe
Copy link

grempe commented Jul 1, 2015

Referencing pull request: #235 (comment)

There is a lack of documentation regarding what pre-commit hooks (and probably others as well) can do as a result of implementation details of overcommit.

For example, pre-commit hooks implemented in overcommit cannot have side effects. You cannot modify, add, remove files from within a pre-commit hook since the workflow for running that hook involves stashing all unindexed content in the work dir, doing a git reset --hard, and stash apply. These actions overwrite any changes that a script might have made.

Currently this behavior is undocumented.

@grempe
Copy link
Author

grempe commented Jul 1, 2015

I referenced the wrong comment. It should be: #235 (comment)

@sds sds added the enhancement label Jul 1, 2015
@sds
Copy link
Owner

sds commented Jul 4, 2015

Added some documentation in 6c88caf.

@sds sds closed this as completed Jul 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants