commit 596621dc6efdb5df8acbc2be5d8b739018fb947d (tree) parent 5bf3fd40f6e0d5b30c14d805ff7c4c352bd2f2fa Author: Tim Pope <code@tpope.net> Date: Mon, 30 May 2022 16:39:06 -0400 Support Git for Windows bundled MSYS Vim References: https://github.com/tpope/vim-fugitive/issues/1970 Diffstat:
| M | plugin/fugitive.vim | | | 12 | +++++++++--- |
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -526,9 +526,15 @@ else return a:path endfunction - function! FugitiveVimPath(path) abort - return a:path - endfunction + if has('win32unix') && filereadable('/git-bash.exe') + function! FugitiveVimPath(path) abort + return substitute(a:path, '^\(\a\):', '/\l\1', '') + endfunction + else + function! FugitiveVimPath(path) abort + return a:path + endfunction + endif endif