-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
MERGE_HEAD is lost #756
Comments
Thanks for the report! This should be handled by lint-staged automatically, but it appears broken for you. Can you post the debug logs by running lint-staged with the |
Sure, here are the relevant logs. After this, my commands start to run but if I open a new terminal and inspect the
|
How do you abort during the commit? |
When I abort I press ^C. However note that my actual problem is that the files aren't there while the commands are running (so for example writing back the file after the abort wouldn't fix it). Is there a reason why the files aren't written back right after the stash in the prepare step? |
@arcanis I think after the recent refactoring we only stash once, and indeed the files should be safe to add back right after! Let me try it... |
I was able to restore EDIT: Released in v10.0.0-beta.9 |
I just experienced it with the To reproduce I made several commits and then I ran
|
Thanks @okonet, I’ll check it out. The test does a rebase of two branches after a merge, maybe there’s an edge case. |
@okonet I believe your fail was because I was only backing up the state when I also improved error handling in the case that there are errors during the first step (such as this). Released in v10.0.0-beta.13 |
Cool I’ll test it |
|
Description
I'm trying to change the behaviour of one of our postinstall scripts when the commit is done through a merge rather than a typical standalone commit. This doesn't seem possible at the moment, because lint-staged (10.0.0-beta.8) removes the MERGE_HEAD file and doesn't seem to restore it.
Steps to reproduce
Environment
lint-staged
: 10.0.0-beta.8The text was updated successfully, but these errors were encountered: