Work around slow \\ Windows network path

This commit is contained in:
sgur authored and Tim Pope committed 2011-12-09 23:06:04 -05:00
1 parent fc0c98f5c0
commit b4b75ef682
1 file changed
+1 -1
+1 -1
View File
@@ -116,7 +116,7 @@ function! s:ExtractGitDir(path) abort
let ofn = ""
let nfn = fn
while fn != ofn
if filereadable(fn . '/.git/HEAD')
if isdirectory(fn) && 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$','')