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

Error occurs when using nvim as git editor with git signs #1086

Closed
Kaiser-Yang opened this issue Jul 12, 2024 · 6 comments
Closed

Error occurs when using nvim as git editor with git signs #1086

Kaiser-Yang opened this issue Jul 12, 2024 · 6 comments
Labels
bug Something isn't working unable to reproduce Unable to reproduce problem

Comments

@Kaiser-Yang
Copy link

Kaiser-Yang commented Jul 12, 2024

Description

I use nvim as my git editor, when I use git commit, it gives me:
image

I've tested that when removing the gitsigns plugin, the error messages will be gone.

Neovim version

0.10.0

Operating system and version

Ubuntu 22.04

Expected behavior

No response

Actual behavior

Error executing luv callback: 
 ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/async.lua:85: The coroutine failed with this messaage: ...er/.local/share/nvim/lazy/gitsigns.nvim/lua/gitsigns.lua:34: attempt to index local 'info' (a nil value) 
 stack traceback: 
 ...er/.local/share/nvim/lazy/gitsigns.nvim/lua/gitsigns.lua: in function 'get_gitdir_and_head' 
 ...er/.local/share/nvim/lazy/gitsigns.nvim/lua/gitsigns.lua:54: in function <...er/.local/share/nviim/lazy/gitsigns.nvim/lua/gitsigns.lua:37> 
 stack traceback: 
 [C]: in function 'error' 
 ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/async.lua:85: in function 'cb' 
 ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/async.lua:127: in function 'on_exit' 
 /opt/nvim-linux64/share/nvim/runtime/lua/vim/_system.lua:300: in function </opt/nvim-linux64/share/nvim/runtime/lua/vim/_system.lua:270> 
 [C]: in function 'ui_attach' 
 .../.local/share/nvim/lazy/noice.nvim/lua/noice/ui/init.lua:77: in function 'enable' 
 ...ser/.local/share/nvim/lazy/noice.nvim/lua/noice/init.lua:69: in function 'enable' 
 ...ser/.local/share/nvim/lazy/noice.nvim/lua/noice/init.lua:23: in function <...ser/.local/share/nvvim/lazy/noice.nvim/lua/noice/init.lua:19> 
 [C]: in function 'xpcall' 
 ...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:149: in function 'try' 
 ...ser/.local/share/nvim/lazy/noice.nvim/lua/noice/init.lua:19: in function <...ser/.local/share/nvvim/lazy/noice.nvim/lua/noice/init.lua:18> 

Minimal config

require('gitsigns').setup()

Steps to reproduce

use git commit to open nvim with gitcommit files.

Gitsigns debug messages

No response

Gitsigns cache

No response

@Kaiser-Yang Kaiser-Yang added the bug Something isn't working label Jul 12, 2024
@lewis6991
Copy link
Owner

Repro doesn't work.

@lewis6991 lewis6991 added unable to reproduce Unable to reproduce problem needs response labels Jul 12, 2024
@Kaiser-Yang

This comment was marked as outdated.

@Kaiser-Yang
Copy link
Author

My git config:

[core]
	editor = nvim
	filemode = false

@Kaiser-Yang
Copy link
Author

Repro doesn't work.

Oh, I've make a minimal to reproduce this: git-signs-reproduce

@Kaiser-Yang
Copy link
Author

Just copy the .config to home diretory:
image

Then make sure git editor is nvim, use git commit will reproduce:
image

@lewis6991
Copy link
Owner

Fixed in e784e5a

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

No branches or pull requests

2 participants