Apply insteadOf to raw remote URLs in addition to remote names

This also retools FugitiveRemoteUrl() argument handling to be a bit more
flexible.
This commit is contained in:
Tim Pope
2021-08-07 15:16:15 -04:00
parent 8def00c247
commit 2ee6a48d0b
2 changed files with 36 additions and 20 deletions

View File

@@ -171,7 +171,7 @@ endfunction
" An optional second argument provides the Git dir, or the buffer number of a
" buffer with a Git dir. The default is the current buffer.
function! FugitiveRemoteUrl(...) abort
return fugitive#RemoteUrl(a:0 ? a:1 : '', a:0 > 1 ? a:2 : -1, a:0 > 2 ? a:3 : 0)
return call('fugitive#RemoteUrl', a:000)
endfunction
" FugitiveHead() retrieves the name of the current branch. If the current HEAD