Fix erroneous check for //objects

This was particularly detrimental on Windows, where it caused a slow
network lookup.

Closes #210.
This commit is contained in:
Tim Pope
2012-06-04 15:16:48 -04:00
parent 6515bd43ac
commit 1eb4a9f7e3

View File

@@ -100,7 +100,7 @@ let s:abstract_prototype = {}
" Initialization {{{1 " Initialization {{{1
function! fugitive#is_git_dir(path) abort 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 return isdirectory(path.'objects') && isdirectory(path.'refs') && getfsize(path.'HEAD') > 10
endfunction endfunction