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

[Bug] E5560 on DiffviewOpen nvim_buf_is_valid must not be called in a lua loop callback #466

Open
ansonos opened this issue Feb 21, 2024 · 1 comment
Labels
bug Something isn't working more info needed

Comments

@ansonos
Copy link

ansonos commented Feb 21, 2024

Description

Using DiffviewOpen results in an immediate crash when using it on a repository that has outstanding merge conflicts in files.

Expected behavior

DiffviewOpen shows merge conflicts.

Actual behavior

DiffviewOpen results in an error and no conflicts are shown.

Steps to reproduce

Couldn't provoke/reproduce it - repository can't be shared unfortunately. But it seems to need files that have been deleted on at least one side.

Health check

Output of :checkhealth diffview

diffview: require("diffview.health").check()
Checking plugin dependencies
- OK nvim-web-devicons installed.
Checking VCS tools
- The plugin requires at least one of the supported VCS tools to be valid.
- OK Git found.
- OK Git is up-to-date. (2.43.2)
- WARNING Configured hg_cmd is not executable: 'hg'

Log info

Relevant info from :DiffviewLog

[INFO  2024-02-21 09:18:34.730 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/lib.lua:24: [command call] :DiffviewOpen
[INFO  2024-02-21 09:18:34.870 +0100] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [DiffView] Completed update for 176 files successfully (92.088 ms)
[ERROR 2024-02-21 09:18:34.871 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:329: Job expected output, but returned nothing! Code: 128
[ERROR 2024-02-21 09:18:34.871 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343: [job-info] Exit code: 128
[ERROR 2024-02-21 09:18:34.871 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cmd] git 'show' ':2:'
[ERROR 2024-02-21 09:18:34.871 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cwd] 
[ERROR 2024-02-21 09:18:34.871 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:   [stderr] fatal: path '' is in the index, but not at stage 2
hint: Did you mean ':1:'?
[WARN  2024-02-21 09:18:34.871 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:381: (1/2) Retrying job...
[ERROR 2024-02-21 09:18:34.873 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:329: Job expected output, but returned nothing! Code: 128
[ERROR 2024-02-21 09:18:34.873 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343: [job-info] Exit code: 128
[ERROR 2024-02-21 09:18:34.873 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cmd] git 'show' ':2:'
[ERROR 2024-02-21 09:18:34.873 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cwd] 
[ERROR 2024-02-21 09:18:34.873 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:   [stderr] fatal: path '' is in the index, but not at stage 2
hint: Did you mean ':1:'?
[WARN  2024-02-21 09:18:34.873 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:381: (2/2) Retrying job...
[ERROR 2024-02-21 09:18:34.875 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:329: Job expected output, but returned nothing! Code: 128
[ERROR 2024-02-21 09:18:34.875 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343: [job-info] Exit code: 128
[ERROR 2024-02-21 09:18:34.875 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cmd] git 'show' ':2:'
[ERROR 2024-02-21 09:18:34.875 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cwd] 
[ERROR 2024-02-21 09:18:34.875 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:   [stderr] fatal: path '' is in the index, but not at stage 2
hint: Did you mean ':1:'?
[ERROR 2024-02-21 09:18:34.875 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:337: All retries failed!
[ERROR 2024-02-21 09:18:34.875 +0100] ...re/nvim/lazy/diffview.nvim/lua/diffview/scene/window.lua:106: ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
	context: cur_thread= co_thread= co_func=.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:199
.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:252: Job expected output, but returned nothing! Code: 128
fatal: path '' is in the index, but not at stage 2
hint: Did you mean ':1:'?
stack traceback:
	[C]: in function 'error'
	.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:252: in function <.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:199>
	[C]: in function 'xpcall'
	...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:361: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
	[C]: in function 'error'
	...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:369: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
[ERROR 2024-02-21 09:18:34.875 +0100] ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/utils.lua:83: Failed to create diff buffer: ':2:'
[ERROR 2024-02-21 09:18:34.888 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:329: Job expected output, but returned nothing! Code: 128
[ERROR 2024-02-21 09:18:34.888 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343: [job-info] Exit code: 128
[ERROR 2024-02-21 09:18:34.888 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cmd] git 'show' ':3:'
[ERROR 2024-02-21 09:18:34.888 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cwd] 
[ERROR 2024-02-21 09:18:34.888 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:   [stderr] fatal: path '' is in the index, but not at stage 3
hint: Did you mean ':1:'?
[WARN  2024-02-21 09:18:34.889 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:381: (1/2) Retrying job...
[ERROR 2024-02-21 09:18:34.893 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:329: Job expected output, but returned nothing! Code: 128
[ERROR 2024-02-21 09:18:34.893 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343: [job-info] Exit code: 128
[ERROR 2024-02-21 09:18:34.893 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cmd] git 'show' ':3:'
[ERROR 2024-02-21 09:18:34.893 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cwd] 
[ERROR 2024-02-21 09:18:34.893 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:   [stderr] fatal: path '' is in the index, but not at stage 3
hint: Did you mean ':1:'?
[WARN  2024-02-21 09:18:34.893 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:381: (2/2) Retrying job...
[ERROR 2024-02-21 09:18:34.896 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:329: Job expected output, but returned nothing! Code: 128
[ERROR 2024-02-21 09:18:34.896 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343: [job-info] Exit code: 128
[ERROR 2024-02-21 09:18:34.896 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cmd] git 'show' ':3:'
[ERROR 2024-02-21 09:18:34.896 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cwd] 
[ERROR 2024-02-21 09:18:34.896 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:   [stderr] fatal: path '' is in the index, but not at stage 3
hint: Did you mean ':1:'?
[ERROR 2024-02-21 09:18:34.896 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:337: All retries failed!
[ERROR 2024-02-21 09:18:34.896 +0100] ...re/nvim/lazy/diffview.nvim/lua/diffview/scene/window.lua:106: ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
	context: cur_thread= co_thread= co_func=.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:199
.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:252: Job expected output, but returned nothing! Code: 128
fatal: path '' is in the index, but not at stage 3
hint: Did you mean ':1:'?
stack traceback:
	[C]: in function 'error'
	.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:252: in function <.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:199>
	[C]: in function 'xpcall'
	...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:361: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
	[C]: in function 'error'
	...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:369: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
[ERROR 2024-02-21 09:18:34.896 +0100] ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/utils.lua:83: Failed to create diff buffer: ':3:'
[INFO  2024-02-21 09:18:35.859 +0100] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [DiffView] Completed update for 176 files successfully (92.972 ms)
[ERROR 2024-02-21 09:18:35.860 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:329: Job expected output, but returned nothing! Code: 128
[ERROR 2024-02-21 09:18:35.860 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343: [job-info] Exit code: 128
[ERROR 2024-02-21 09:18:35.860 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cmd] git 'show' ':2:'
[ERROR 2024-02-21 09:18:35.860 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cwd] 
[ERROR 2024-02-21 09:18:35.860 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:   [stderr] fatal: path '' is in the index, but not at stage 2
hint: Did you mean ':1:'?
[WARN  2024-02-21 09:18:35.860 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:381: (1/2) Retrying job...
[ERROR 2024-02-21 09:18:35.865 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:329: Job expected output, but returned nothing! Code: 128
[ERROR 2024-02-21 09:18:35.865 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343: [job-info] Exit code: 128
[ERROR 2024-02-21 09:18:35.865 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cmd] git 'show' ':2:'
[ERROR 2024-02-21 09:18:35.865 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cwd] 
[ERROR 2024-02-21 09:18:35.865 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:   [stderr] fatal: path '' is in the index, but not at stage 2
hint: Did you mean ':1:'?
[WARN  2024-02-21 09:18:35.865 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:381: (2/2) Retrying job...
[ERROR 2024-02-21 09:18:35.867 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:329: Job expected output, but returned nothing! Code: 128
[ERROR 2024-02-21 09:18:35.867 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343: [job-info] Exit code: 128
[ERROR 2024-02-21 09:18:35.867 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cmd] git 'show' ':2:'
[ERROR 2024-02-21 09:18:35.867 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:      [cwd] 
[ERROR 2024-02-21 09:18:35.867 +0100] ...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:343:   [stderr] fatal: path '' is in the index, but not at stage 2
hint: Did you mean ':1:'?
[ERROR 2024-02-21 09:18:35.867 +0100] ...local/share/nvim/lazy/diffview.nvim/lua/diffview/job.lua:337: All retries failed!
[ERROR 2024-02-21 09:18:35.867 +0100] ...re/nvim/lazy/diffview.nvim/lua/diffview/scene/window.lua:106: ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
	context: cur_thread= co_thread= co_func=.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:199
.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:252: Job expected output, but returned nothing! Code: 128
fatal: path '' is in the index, but not at stage 2
hint: Did you mean ':1:'?
stack traceback:
	[C]: in function 'error'
	.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:252: in function <.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:199>
	[C]: in function 'xpcall'
	...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:361: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
	[C]: in function 'error'
	...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:369: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
[ERROR 2024-02-21 09:18:35.867 +0100] ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/utils.lua:83: Failed to create diff buffer: ':2:'
[INFO  2024-02-21 09:18:44.179 +0100] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [DiffView] Completed update for 176 files successfully (104.025 ms)
[INFO  2024-02-21 09:18:44.884 +0100] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [DiffView] Completed update for 176 files successfully (105.704 ms)
[INFO  2024-02-21 09:18:45.873 +0100] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [DiffView] Completed update for 176 files successfully (93.657 ms)
[INFO  2024-02-21 09:18:46.883 +0100] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [DiffView] Completed update for 176 files successfully (101.997 ms)
[INFO  2024-02-21 09:18:47.872 +0100] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [DiffView] Completed update for 176 files successfully (90.484 ms)
[INFO  2024-02-21 09:19:43.391 +0100] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [DiffView] Completed update for 176 files successfully (108.989 ms)
[INFO  2024-02-21 09:19:43.953 +0100] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:483: [DiffView] Completed update for 176 files successfully (115.071 ms)

messages

[Diffview.nvim] Failed to create diff buffer: ':2:'
[Diffview.nvim] Failed to create diff buffer: ':3:'
[Diffview.nvim] Failed to create diff buffer: ':2:'
Error executing luv callback:
...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
        context: cur_thread=main co_thread= co_func=...are/nvim/lazy/diffview.nvim/lua/diffview/vcs/adapter.lua:350
...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
        context: cur_thread= co_thread= co_func=.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:180
...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
        context: cur_thread= co_thread= co_func=...re/nvim/lazy/diffview.nvim/lua/diffview/scene/window.lua:92
...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
        context: cur_thread= co_thread= co_func=...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:264
...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
        context: cur_thread= co_thread= co_func=...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:193
...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
        context: cur_thread= co_thread= co_func=...nvim/lua/diffview/scene/views/standard/standard_view.lua:134
...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
        context: cur_thread= co_thread= co_func=...lazy/diffview.nvim/lua/diffview/scene/layouts/diff_3.lua:62
...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
        context: cur_thread= co_thread= co_func=...re/nvim/lazy/diffview.nvim/lua/diffview/scene/layout.lua:163
...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
        context: cur_thread= co_thread= co_func=...re/nvim/lazy/diffview.nvim/lua/diffview/scene/window.lua:92
.../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:301: E5560: nvim_buf_is_valid must not be called in a lua loop callback
stack traceback:
        [C]: in function 'nvim_buf_is_valid'
        .../share/nvim/lazy/diffview.nvim/lua/diffview/vcs/file.lua:301: in function 'is_valid'
        ...re/nvim/lazy/diffview.nvim/lua/diffview/scene/window.lua:95: in function <...re/nvim/lazy/diffview.nvim/lua/diffview/scene/window.lua:92>
        [C]: in function 'xpcall'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:361: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:369: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: in function 'raise'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:215: in function 'step'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:412: in function 'load_file'
        ...re/nvim/lazy/diffview.nvim/lua/diffview/scene/layout.lua:177: in function <...re/nvim/lazy/diffview.nvim/lua/diffview/scene/layout.lua:163>
        [C]: in function 'xpcall'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:361: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:369: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: in function 'raise'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:307: in function 'await'
        ...lazy/diffview.nvim/lua/diffview/scene/layouts/diff_3.lua:71: in function <...lazy/diffview.nvim/lua/diffview/scene/layouts/diff_3.lua:62>
        [C]: in function 'xpcall'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:361: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:369: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: in function 'raise'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:307: in function 'await'
        ...nvim/lua/diffview/scene/views/standard/standard_view.lua:162: in function <...nvim/lua/diffview/scene/views/standard/standard_view.lua:134>
        [C]: in function 'xpcall'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:361: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:369: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: in function 'raise'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:307: in function 'await'
        ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:203: in function <...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:193>
        [C]: in function 'xpcall'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:361: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:369: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: in function 'raise'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:307: in function 'await'
        ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:278: in function <...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:264>
        [C]: in function 'xpcall'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:361: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:369: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: in function 'raise'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:215: in function 'step'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:247: in function 'notify_all'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:213: in function 'step'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:247: in function 'notify_all'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:213: in function 'step'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:247: in function 'notify_all'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:213: in function 'step'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:247: in function 'notify_all'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:213: in function 'step'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:247: in function 'notify_all'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:402: in function 'callback'
        ...re/nvim/lazy/diffview.nvim/lua/diffview/scene/window.lua:110: in function <...re/nvim/lazy/diffview.nvim/lua/diffview/scene/window.lua:92>
        [C]: in function 'xpcall'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:361: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack trac

Neovim version

NVIM v0.9.5
Build type: RelWithDebInfo
LuaJIT 2.1.1692716794
Compilation: /usr/bin/gcc -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=auto -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DUSING_UV_SHARED=1 -I/usr/include/luajit-2.1 -I/usr/include -I/usr/include/luv -I/builddir/build/BUILD/neovim-0.9.5/redhat-linux-build/src/nvim/auto -I/builddir/build/BUILD/neovim-0.9.5/redhat-linux-build/include -I/builddir/build/BUILD/neovim-0.9.5/redhat-linux-build/cmake.config -I/builddir/build/BUILD/neovim-0.9.5/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Operating system and version

Linux 6.7.4-200.fc39.x86_64 x86_64 GNU/Linux

Minimal config

-- #######################################
-- ### USAGE: nvim --clean -u mini.lua ###
-- #######################################

local root = vim.fn.stdpath("run") .. "/nvim/diffview.nvim"
vim.fn.mkdir(root, "p")

-- set stdpaths to use root
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  {
    "sindrets/diffview.nvim",
    dependencies = { "nvim-tree/nvim-web-devicons" },
    config = function()
      require("diffview").setup({
        -- ##############################################################################
        -- ### ADD DIFFVIEW.NVIM CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE ###
        -- ##############################################################################
      })
    end,
  },
  -- ##################################################################
  -- ### ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE ###
  -- ##################################################################
}
require("lazy").setup(plugins, { root = root .. "/plugins" })
require("lazy").sync({ show = false, wait = true })

vim.opt.termguicolors = true
vim.cmd("colorscheme " .. (vim.fn.has("nvim-0.8") == 1 and "habamax" or "slate"))

-- ############################################################################
-- ### ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE ###
-- ############################################################################
@ansonos ansonos added the bug Something isn't working label Feb 21, 2024
@sindrets
Copy link
Owner

This is impossible to debug without a repo that can reliably reproduce it. I see that there are some strange errors in the log:

fatal: path '' is in the index, but not at stage 2
hint: Did you mean ':1:'?

Were there perhaps some files with some strange paths? How was the conflict produced (merge / rebase / stash apply / cherry-pick / ...other)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working more info needed
Projects
None yet
Development

No branches or pull requests

2 participants