mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 15:23:51 -05:00
Don't assume support for remote get-url
References https://github.com/tpope/vim-fugitive/issues/844
This commit is contained in:
@@ -2313,9 +2313,14 @@ function! s:Browse(bang,line1,count,...) abort
|
||||
|
||||
if empty(remote)
|
||||
let remote = '.'
|
||||
let raw = s:repo().git_chomp('remote','get-url','origin')
|
||||
let remote_for_url = 'origin'
|
||||
else
|
||||
let raw = s:repo().git_chomp('remote','get-url',remote)
|
||||
let remote_for_url = remote
|
||||
endif
|
||||
if fugitive#git_version() =~# '^[01]\.|^2\.[0-6]\.'
|
||||
let raw = s:repo().git_chomp('config','remote.'.remote_for_url.'.url')
|
||||
else
|
||||
let raw = s:repo().git_chomp('remote','get-url',remote_for_url)
|
||||
endif
|
||||
if raw ==# ''
|
||||
let raw = remote
|
||||
|
||||
Reference in New Issue
Block a user