tpope / vim-fugitive

fugitive.vim: A Git wrapper so awesome, it should be illegal
https://www.vim.org/scripts/script.php?script_id=2975
19.82k stars 1k forks source link

Cannot read or write temp files on diff command #2321

Closed keitee closed 1 month ago

keitee commented 1 month ago

Hi all,

When running "Git difftool -y" under neovim and lazy, gets following error:

nvim --version

NVIM v0.10.0 Build type: RelWithDebInfo LuaJIT 2.1.1713484068 Run "nvim -V1 -v" for more info

fugitive

Error detected while processing function fugitive#Diffsplit[140]..function fugitive#Diffsplit: line 122: E121: Undefined variable: diff E810: Cannot read or write temp files E97: Cannot create diffs Press ENTER or type command to continue

Since fugitive works well on Vim on the same machine, permission of tmp seems to be fine. Any suggestions to try out would be appreciated.

Many thanks

tpope commented 1 month ago

Looks to me like :diffsplit is broken. You can confirm with :diffsplit /dev/null. If it causes an error, that's the real problem, not Fugitive.

keitee commented 1 month ago

That's right and diffsplit still causes an error. Thanks for the pointer and need to figure out though. :-)