commit 5bf3fd40f6e0d5b30c14d805ff7c4c352bd2f2fa (tree)
parent 950f9c49fce8c2a2283182416a5aee0c1525e80c
Author: Tim Pope <code@tpope.net>
Date: Mon, 30 May 2022 03:48:31 -0400
Provide FugitiveActualDir()
This is intended to free up FugitiveGitDir() to refer to the ".git" file
in that work tree and submodule repositories use. I wish I had better
names for these two. Settling for "Actual" as that at least has a
pleasing 6 letter symmetry with "Common".
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -283,9 +283,13 @@ function! FugitiveStatusline(...) abort
return fugitive#Statusline()
endfunction
+function! FugitiveActualDir(...) abort
+ return call('FugitiveGitDir', a:000)
+endfunction
+
let s:commondirs = {}
function! FugitiveCommonDir(...) abort
- let dir = FugitiveGitDir(a:0 ? a:1 : -1)
+ let dir = call('FugitiveActualDir', a:000)
if empty(dir)
return ''
endif