From 7a087725eebedf4c23b621d9a25ca6fac9a0a985 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 30 Jul 2021 14:08:18 -0400 Subject: [PATCH] Encourage FugitiveFind() over FugitiveGitDir() --- plugin/fugitive.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index a8eca44..6be6504 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -13,7 +13,8 @@ let s:bad_git_dir = '/$\|^fugitive:' " 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 " 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 if v:version < 704 return ''