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).
This commit is contained in:
Tim Pope
2022-05-11 02:07:35 -04:00
parent 87923d1b1b
commit f529acef74

View File

@@ -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 =~# '\.$'