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".
This commit is contained in:
Tim Pope
2022-05-30 03:48:31 -04:00
parent 950f9c49fc
commit 5bf3fd40f6

View File

@@ -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