Skip to content

Conversation

@iguessthislldo
Copy link
Contributor

@iguessthislldo iguessthislldo commented May 22, 2025

In Neovim 0.11.1 within MSYS2 on Windows, gitgutter wasn't showing up. After some flailing around, I found adding
set shellcmdflag=-c shellxquote= shellxescape= from here, got :echo system('git --version') working. The signs were still not showing up, but there were files being dumped in my current working directory that looked like corrupted Windows paths.

After using let g:gitgutter_log=1 and looking at the log I found where these temp files were made and I think I fixed it. I haven't tried the non-msys2 Neovim (assuming that's different) or normal vim, but I brought the change over and made sure it worked in Neovim on Linux.

In Neovim 0.11.1 within MSYS2 on Windows, gitgutter wasn't showing up.
After some flailing around, I found adding
`set shellcmdflag=-c shellxquote= shellxescape=`
[from here](neovim/neovim#28384 (comment)),
got `:echo system('git --version')` working. The signs were still not
showing up, but there were files being dumped in my current working
directory that looked like corrupted Windows paths.

After using `let g:gitgutter_log=1` and looking at the log I found where
these temp files were made and I think I fixed it. I haven't tried the
non-msys2 Neovim (assuming that's different) or normal vim, but I
brought the change over and made sure it worked in Neovim on Linux.
@iguessthislldo
Copy link
Contributor Author

Force pushed to fix the URL to the Neovim issue.

@airblade
Copy link
Owner

Thanks for reporting this. I don't use Windows so (a) I don't know if something doesn't work there, and (b) I can't tell when it is fixed. So thank you for taking the time to figure out an answer.

The whole running-things-in-a-shell-on-Windows thing has always been a nightmare.

Your patch makes sense and in fact I'm not sure why I didn't write it that way to start with.

The tests all pass so I'll merge this.

@airblade airblade merged commit 85ca3a0 into airblade:main May 26, 2025
@iguessthislldo iguessthislldo deleted the igtd/windows branch May 26, 2025 18:11
@iguessthislldo
Copy link
Contributor Author

The whole running-things-in-a-shell-on-Windows thing has always been a nightmare.

I agree. If I wasn't temporarily forced to use MSYS2 instead of WSL or normal Linux, I wouldn't bother trying to get this working.

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.

2 participants