mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 13:53:51 -05:00
Fix FugitiveIsGitDir()
This commit is contained in:
@@ -231,11 +231,11 @@ function! FugitiveWorkTree(...) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! FugitiveIsGitDir(...) abort
|
function! FugitiveIsGitDir(...) abort
|
||||||
if !a:0 || type(a:1) !=# ''
|
if !a:0 || type(a:1) !=# type('')
|
||||||
return !empty(call('FugitiveGitDir', a:000))
|
return !empty(call('FugitiveGitDir', a:000))
|
||||||
endif
|
endif
|
||||||
let path = substitute(a:1, '[\/]$', '', '') . '/'
|
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') ||
|
\ isdirectory(path.'objects') && isdirectory(path.'refs') ||
|
||||||
\ getftype(path.'commondir') ==# 'file')
|
\ getftype(path.'commondir') ==# 'file')
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user