From f529acef74b4266d94f22414c60b4a8930c1e0f3 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 11 May 2022 02:07:35 -0400 Subject: [PATCH] Force Vim path normalization in fugitive#Path() This only matters for use cases where the paths differ by more than just slashes (theoretically possible with mixed WSL setups). --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index bd6ff94..b5f6731 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1682,8 +1682,8 @@ function! fugitive#Path(url, ...) abort if empty(a:url) return '' endif - let dir = a:0 > 1 ? s:Dir(a:2) : s:Dir() - let tree = s:Tree(dir) + let dir = FugitiveVimPath(call('s:GitDir', a:000[1:-1])) + let tree = call('fugitive#Find', [':/'] + a:000[1:-1]) if !a:0 return fugitive#Real(a:url) elseif a:1 =~# '\.$'