mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-03 08:53:51 +08:00
Allow reusing dictionary for config queries
This commit is contained in:
1 parent
73220820b5
commit
4ecd7e8932
2 files changed
+15
-11
No files matched your search
+4
-4
@@ -73,10 +73,10 @@ function! FugitivePrepare(...) abort
|
||||
endfunction
|
||||
|
||||
function! FugitiveConfig(...) abort
|
||||
if len(a:000) == 2
|
||||
return fugitive#Config(a:000[1], FugitiveGitDir(a:000[2]))
|
||||
elseif len(a:000) == 1 && a:000[0] !~# '^[[:alnum:]-]\+\.'
|
||||
return fugitive#Config(FugitiveGitDir(a:000[0]))
|
||||
if a:0 == 2 && type(a:2) != type({})
|
||||
return fugitive#Config(a:1, FugitiveGitDir(a:2))
|
||||
elseif a:0 == 1 && a:1 !~# '^[[:alnum:]-]\+\.'
|
||||
return fugitive#Config(FugitiveGitDir(a:1))
|
||||
else
|
||||
return call('fugitive#Config', a:000)
|
||||
endif
|
||||
|
||||
Reference in new issue
Block a user