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

fix(update): always update file info when refreshing compare text #1008

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lewis6991
Copy link
Owner

Fixes #847

@emmanueltouzery
Copy link

unfortunately i already reproduced the error even with this version..

Error executing vim.schedule lua callback: ...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/async.lua:85: The coroutine failed with this message: ...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/hunks.lua:174: Invalid hunk with untracked=true hunk="@@ -25,1 +25,1 @@"
stack traceback:
	[C]: in function 'assert'
	...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/hunks.lua:174: in function 'calc_signs'
	...pack/packer/start/gitsigns.nvim/lua/gitsigns/manager.lua:52: in function 'apply_win_signs0'
	...pack/packer/start/gitsigns.nvim/lua/gitsigns/manager.lua:76: in function 'apply_win_signs'
	...pack/packer/start/gitsigns.nvim/lua/gitsigns/manager.lua:517: in function 'fn'
	...ack/packer/start/gitsigns.nvim/lua/gitsigns/debounce.lua:68: in function 'update'
	...pack/packer/start/gitsigns.nvim/lua/gitsigns/watcher.lua:101: in function <...pack/packer/start/gitsigns.nvim/lua/gitsigns/watcher.lua:63>
stack traceback:
	[C]: in function 'error'
	...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/async.lua:85: in function 'cb'
	...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/async.lua:127: in function <...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/async.lua:126>
	[C]: in function 'resume'
	...e/pack/packer/start/diffview.nvim/lua/diffview/async.lua:193: in function 'step'
	...e/pack/packer/start/diffview.nvim/lua/diffview/async.lua:247: in function 'notify_all'
	...e/pack/packer/start/diffview.nvim/lua/diffview/async.lua:222: in function 'step'
	...e/pack/packer/start/diffview.nvim/lua/diffview/async.lua:399: in function <...e/pack/packer/start/diffview.nvim/lua/diffview/async.lua:391>

i do believe it's related to how slow neovim is. right now i'm making a big port, the lsp is very slow, many build errors and so on.

this was again from diffview.

@lewis6991 lewis6991 force-pushed the syncct branch 10 times, most recently from 17a0d93 to 01df36a Compare April 26, 2024 10:58
@lewis6991
Copy link
Owner Author

lewis6991 commented Apr 26, 2024

I've significantly reworked this, so the buffer contents come from the direct git object as opposed to running the more abstract git show <revision>:<path> command. This should ensure the buffer contents always matches the tracked object name, even if it's not up-to-date because of other processes.

@lewis6991 lewis6991 force-pushed the syncct branch 3 times, most recently from db83dc6 to 8b44296 Compare April 26, 2024 11:36
@lewis6991
Copy link
Owner Author

@emmanueltouzery have you had a chance to test this?

@emmanueltouzery
Copy link

yes, I'm using it. I did not reproduce the issue since switching to it. However I have finished my huge refactor and I'm less likely to reproduce the issue right now. Even before this refactor I would reproduce the issue regularly, but not as readily. Maybe once per week, give or take. I intend to stay on the branch and report if I reproduce the issue again.

@lewis6991
Copy link
Owner Author

However I have finished my huge refactor and I'm less likely to reproduce the issue right now.

Even with your system being pushed with so many git operations, gitsigns shouldn't error. What's useful about your situation is that you can reproduce this issue much more easily than others.

@lewis6991 lewis6991 force-pushed the syncct branch 5 times, most recently from 968ec9b to bc6d995 Compare May 1, 2024 11:06
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 this pull request may close these issues.

Assertion failed in coroutine
2 participants