Closed
Description
Is your feature request related to a problem? Please describe.
msys2 git support
Describe the solution you'd like
msys git path like /e/Downloads/testc
(E:\Downloads\testc)
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
patch:
diff --git a/lua/nvim-tree/git/utils.lua b/lua/nvim-tree/git/utils.lua
index 21f2c7f..cb28f8d 100644
--- a/lua/nvim-tree/git/utils.lua
+++ b/lua/nvim-tree/git/utils.lua
@@ -10,6 +10,10 @@ function M.get_toplevel(cwd)
-- git always returns path with forward slashes
if vim.fn.has "win32" == 1 then
+ -- msys2
+ if vim.fn.executable('cygpath') then
+ toplevel = vim.fn.system("cygpath -w " .. vim.fn.shellescape(toplevel))
+ end
toplevel = toplevel:gsub("/", "\\")
end