From 03e138c3496926b193402f4e1542f0a99924f999 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 8 Feb 2012 13:03:10 -0500 Subject: [PATCH] Attempt to address more Windows slowness (#150) --- plugin/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index f612cda..ee4cde6 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -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$','')