-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unstaged modification lost when running git hook #552
Comments
I believe your changes may just be stashed, so you can theoretically get them back by unstashing your changes. Sorry about this. I'll see if we can get a release out this week. |
Sadly, the changes are not stashed. It is the first check I have done Thanks for the answer. |
Now with the
Might be useful for anybody who is affected by this issue. Should the script not also handle the |
Thanks @JeroenErikJensen-TomTom for that tip. fyi, The latest release (10.2.1) also has a bug in it. It is fixed by Fix pre-commit hook command not found error. |
Hi,
After running precommit hook, I have lost my unstaged modification :-(
It occurs when you have unstaged modification and ktlint detect an issue in the staged files.
The pre-commit remove modification and doesn't re-apply them as ktlint returns an error
The issue is in the pre-commit hook and seems to be fixed by Use Gradle command exit code as hook exit code.
The issue come from here : Resolve pre-commit hook causing conflicts
Do you think it is possible to create new version with this fix ? I think it can save work of many peoples :-)
I think that a better solution should be found : remove the modification in a pre-commit hook is a big risk !
The stash used before the regression has the advantage to not lost the modification. It is the first check I have done when I lost my modifications.
The text was updated successfully, but these errors were encountered: