mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Avoid IO from ":p" during detection
This commit is contained in:
@@ -413,9 +413,10 @@ function! FugitiveExtractGitDir(path) abort
|
||||
return matchstr(path, '\C^fugitive:\%(//\)\=\zs.\{-\}\ze\%(//\|::\|$\)')
|
||||
elseif empty(path)
|
||||
return ''
|
||||
else
|
||||
let path = fnamemodify(path, ':p:h')
|
||||
elseif path !~# '^/\|^\a\+:'
|
||||
let path = s:Slash(getcwd()) . '/' . path
|
||||
endif
|
||||
let path = fnamemodify(path, ':h')
|
||||
let pre = substitute(matchstr(path, '^\a\a\+\ze:'), '^.', '\u&', '')
|
||||
if len(pre) && exists('*' . pre . 'Real')
|
||||
let path ={pre}Real(path)
|
||||
|
||||
Reference in New Issue
Block a user