mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-10 20:43:46 -05:00
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:
@@ -283,9 +283,13 @@ function! FugitiveStatusline(...) abort
|
|||||||
return fugitive#Statusline()
|
return fugitive#Statusline()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! FugitiveActualDir(...) abort
|
||||||
|
return call('FugitiveGitDir', a:000)
|
||||||
|
endfunction
|
||||||
|
|
||||||
let s:commondirs = {}
|
let s:commondirs = {}
|
||||||
function! FugitiveCommonDir(...) abort
|
function! FugitiveCommonDir(...) abort
|
||||||
let dir = FugitiveGitDir(a:0 ? a:1 : -1)
|
let dir = call('FugitiveActualDir', a:000)
|
||||||
if empty(dir)
|
if empty(dir)
|
||||||
return ''
|
return ''
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user