Neogit currently fails to handle typechange diffs.
These generally happen when the type of a file changes from symlink to a regular file, or from a regular file to a symlink.
The item.mode for typechange is T
The default status.mode_text that's returned by get_default_values() currently has no index called "T"
I'm sure you can see what the problem is.
Since status.mode_text["T"] returns nil, any code that expects status.mode_text[item.mode] to be a string is gonna break.
Neovim version
any
Operating system and version
any
Steps to reproduce
mkdir temp
git init
touch foo
git add foo
git commit -m foo
rm foo
ln -s bar foo
nvim +Neogit
Expected behavior
Everything works fine
Actual behavior
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: ...ra/.local/share/nvim/lazy/neogit/lua/neogit/lib/util.lua:401: attempt to get length
of local 's' (a nil value)
stack traceback:
[C]: in function 'error'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: in function 'callback_or_next'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function 'step'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:48: in function 'execute'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:118: in function 'callback'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:25: in function 'callback_or_next'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function 'saved_callback'
...are/nvim/lazy/plenary.nvim/lua/plenary/async/control.lua:126: in function 'tx'
.../share/nvim/lazy/plenary.nvim/lua/plenary/async/util.lua:67: in function 'callback'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:25: in function 'callback_or_next'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function 'cb'
...era/.local/share/nvim/lazy/neogit/lua/neogit/process.lua:301: in function <...era/.local/share/nvim/lazy/neogit/lua/neogit/process.lua:263>
Description
Neogit currently fails to handle typechange diffs.
These generally happen when the type of a file changes from symlink to a regular file, or from a regular file to a symlink.
item.mode
for typechange isT
status.mode_text
that's returned byget_default_values()
currently has no index called"T"
I'm sure you can see what the problem is.
Since
status.mode_text["T"]
returnsnil
, any code that expectsstatus.mode_text[item.mode]
to be a string is gonna break.Neovim version
any
Operating system and version
any
Steps to reproduce
nvim +Neogit
Expected behavior
Everything works fine
Actual behavior
Minimal config