Experimentally allow passing Git dir to fugitive#Command()

References: https://github.com/tpope/vim-fugitive/issues/1981
This commit is contained in:
Tim Pope
2022-05-22 17:33:53 -04:00
parent cdacef342d
commit 9f30e4d904

View File

@@ -3633,9 +3633,9 @@ for s:colortype in ['advice', 'branch', 'diff', 'grep', 'interactive', 'pager',
call extend(s:disable_colors, ['-c', 'color.' . s:colortype . '=false'])
endfor
unlet s:colortype
function! fugitive#Command(line1, line2, range, bang, mods, arg) abort
function! fugitive#Command(line1, line2, range, bang, mods, arg, ...) abort
exe s:VersionCheck()
let dir = s:Dir()
let dir = call('s:Dir', a:000)
if len(dir)
exe s:DirCheck(dir)
endif