mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 14:23:51 -05:00
Encourage FugitiveFind() over FugitiveGitDir()
This commit is contained in:
@@ -13,7 +13,8 @@ let s:bad_git_dir = '/$\|^fugitive:'
|
|||||||
" FugitiveGitDir() returns the detected Git dir for the given buffer number,
|
" FugitiveGitDir() returns the detected Git dir for the given buffer number,
|
||||||
" or the current buffer if no argument is passed. This will be an empty
|
" or the current buffer if no argument is passed. This will be an empty
|
||||||
" string if no Git dir was found. Use !empty(FugitiveGitDir()) to check if
|
" string if no Git dir was found. Use !empty(FugitiveGitDir()) to check if
|
||||||
" Fugitive is active in the current buffer.
|
" Fugitive is active in the current buffer. Do not rely on this for direct
|
||||||
|
" filesystem access; use FugitiveFind('.git/whatever') instead.
|
||||||
function! FugitiveGitDir(...) abort
|
function! FugitiveGitDir(...) abort
|
||||||
if v:version < 704
|
if v:version < 704
|
||||||
return ''
|
return ''
|
||||||
|
|||||||
Reference in New Issue
Block a user