commit 1eb4a9f7e32d0da674fbd58c6993f2d27bcecee3 (tree)
parent 6515bd43acc28c86fcf3bea64ce8a6b3d7db19ff
Author: Tim Pope <code@tpope.net>
Date: Mon, 4 Jun 2012 15:16:48 -0400
Fix erroneous check for //objects
This was particularly detrimental on Windows, where it caused a slow
network lookup.
Closes #210.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -100,7 +100,7 @@ let s:abstract_prototype = {}
" Initialization {{{1
function! fugitive#is_git_dir(path) abort
- let path = a:path . '/'
+ let path = s:sub(a:path, '[\/]$', '') . '/'
return isdirectory(path.'objects') && isdirectory(path.'refs') && getfsize(path.'HEAD') > 10
endfunction