From 7ab4ab97965d90095e0a3ac4061d76058b2e4c43 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 26 Jul 2021 07:00:06 -0400 Subject: [PATCH] Document FugitiveGitDir() --- plugin/fugitive.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index ad53d2a..603292d 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -10,6 +10,10 @@ let g:loaded_fugitive = 1 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. function! FugitiveGitDir(...) abort if v:version < 704 return ''