From 5bf3fd40f6e0d5b30c14d805ff7c4c352bd2f2fa Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 30 May 2022 03:48:31 -0400 Subject: [PATCH] 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". --- plugin/fugitive.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 464d766..5643500 100644 --- 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