motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit fbf89773b4721ae5b46ccded0ceeee861921b697 (tree)
parent 02a0be79aa81bcd88ea9af3bc5561eecaaca0241
Author: Tim Pope <code@tpope.net>
Date:   Wed, 26 Apr 2017 13:05:13 -0400

Don't assume support for remote get-url

References https://github.com/tpope/vim-fugitive/issues/844

Diffstat:
Mplugin/fugitive.vim | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -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