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
Option for auto-commiting hook-made changes #1086
Labels
Comments
Thanks, I found your remark in one of those issues helpful: I can always make my hook do (I did search the tracker) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The docs say:
The hook must exit nonzero on failure or modify files in the working directory (since 0.6.3).
That is also the observed behavior. In case of a formatter hook though, that means most commits need to be attempted twice: once to re-format them, twice to commit them successfully.
For a sufficiently mature formatter tool, it should be OK to just set sth like
auto_commit_changes: true
in its hook config. This issue is about adding such an option to pre-commit. WDYT?The text was updated successfully, but these errors were encountered: