mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 06:13:51 -05:00
Attempt to address more Windows slowness (#150)
This commit is contained in:
@@ -115,8 +115,8 @@ function! s:ExtractGitDir(path) abort
|
||||
let fn = fnamemodify(path,':s?[\/]$??')
|
||||
let ofn = ""
|
||||
let nfn = fn
|
||||
while fn != ofn
|
||||
if isdirectory(fn) && filereadable(fn . '/.git/HEAD')
|
||||
while fn !=# ofn && fn !=# '/'
|
||||
if filereadable(fn . '/.git/HEAD')
|
||||
return s:sub(simplify(fnamemodify(fn . '/.git',':p')),'\W$','')
|
||||
elseif fn =~ '\.git$' && filereadable(fn . '/HEAD')
|
||||
return s:sub(simplify(fnamemodify(fn,':p')),'\W$','')
|
||||
|
||||
Reference in New Issue
Block a user