Permalink
Browse files

Fix erroneous check for //objects

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

Closes #210.
  • Loading branch information...
1 parent 6515bd4 commit 1eb4a9f7e32d0da674fbd58c6993f2d27bcecee3 @tpope committed Jun 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugin/fugitive.vim
View
@@ -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

0 comments on commit 1eb4a9f

Please sign in to comment.