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

Git error (128) ! #36

Closed
teto opened this issue Feb 2, 2021 · 5 comments · Fixed by #41
Closed

Git error (128) ! #36

teto opened this issue Feb 2, 2021 · 5 comments · Fixed by #41

Comments

@teto
Copy link

teto commented Feb 2, 2021

I keep seeing

Git error (128) !
Press $ to see the command history

as notifications.

Not only that but pressing $ does nothing.
Is there a way to suppress these notifications ?
Btw I like your notification system and you may be interested in neovim/neovim#13843

@teto
Copy link
Author

teto commented Feb 2, 2021

more worrying seems like neogit autoremoves some files, disabling neogit fixed it.

@TimUntersberger
Copy link
Collaborator

TimUntersberger commented Feb 2, 2021

Not only that but pressing $ does nothing

I should probably change the message if the status buffer is not open, because $ is only mapped when inside the status window.

more worrying seems like neogit autoremoves some files, disabling neogit fixed it.

@teto which files were removed?

@teto
Copy link
Author

teto commented Feb 2, 2021

It's a file I had just renamed. Everytime I opened it with neovim it would get emptied with neogit.

@TimUntersberger
Copy link
Collaborator

Could you please tell me the steps you took to encounter this issue?

@RianFuro
Copy link
Contributor

RianFuro commented Feb 7, 2021

@TimUntersberger The errors should come from the renamed file. If git detects a rename, the output looks as follows:

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	renamed:    a.txt -> b.txt

We then naively put that into git commands:

 128 git diff a.txt -> b.txt
 128 git diff --cached a.txt -> b.txt

I can also reproduce that file getting emptied, most likely due to those diff commands. They'd be interpreted as piping the output from the diff commands to b.txt - which is nothing since the commands fail and their only output is on stderr

RianFuro added a commit to RianFuro/neogit that referenced this issue Feb 7, 2021
RianFuro added a commit to RianFuro/neogit that referenced this issue Feb 7, 2021
Status parsing now correctly detects a rename and parses out the name
and original name from the response. The original_name is later used to
reassemble the display for the status buffer.
RianFuro added a commit to RianFuro/neogit that referenced this issue Feb 7, 2021
To get the correct diff on changes after a rename, the call must include
the original file name.
@RianFuro RianFuro mentioned this issue Feb 7, 2021
RianFuro added a commit to RianFuro/neogit that referenced this issue Feb 8, 2021
RianFuro added a commit to RianFuro/neogit that referenced this issue Feb 8, 2021
Status parsing now correctly detects a rename and parses out the name
and original name from the response. The original_name is later used to
reassemble the display for the status buffer.
RianFuro added a commit to RianFuro/neogit that referenced this issue Feb 8, 2021
To get the correct diff on changes after a rename, the call must include
the original file name.
TimUntersberger added a commit that referenced this issue Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants