From dfae8191f4527542059804bef28e2818bcec4b78 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 8 Aug 2021 05:03:11 -0400 Subject: [PATCH] Fix FugitiveIsGitDir() --- plugin/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 6b41f39..0e04048 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -231,11 +231,11 @@ function! FugitiveWorkTree(...) abort endfunction function! FugitiveIsGitDir(...) abort - if !a:0 || type(a:1) !=# '' + if !a:0 || type(a:1) !=# type('') return !empty(call('FugitiveGitDir', a:000)) endif let path = substitute(a:1, '[\/]$', '', '') . '/' - return len(a:path) && getfsize(path.'HEAD') > 10 && ( + return len(path) && getfsize(path.'HEAD') > 10 && ( \ isdirectory(path.'objects') && isdirectory(path.'refs') || \ getftype(path.'commondir') ==# 'file') endfunction