-
Notifications
You must be signed in to change notification settings - Fork 13
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
Don't unstage on failure #14
Comments
Its been a long time since I've looked at this if I'm honest but I think it was possible to commit the patch even though the hook rejected it. If this is not the case then I'm happy to accept a PR removing this but please do ensure that hook isn't being circumvented. Apologies for the annoyance @saferoll. |
Actually I've just remembered why! |
But why call this?: subprocess.Popen([Git, "reset", "HEAD", "--", "."]) |
As I said before, the staged changes contain badly formatted code but after running clang-format the hook will not fail, this relies on the user to stage the newly formatted code but if this is not done then badly formatted code could be committed. I will admit this is a heavy handed approach and am open to suggestions for better solutions. |
In case you want to resolve this issue: |
Why git reset all files when the check fails? This is REALLY annoying.
The text was updated successfully, but these errors were encountered: