Fix regexp checking Git version in :Gbrowse
References https://github.com/tpope/vim-fugitive/issues/844
This commit is contained in:
parent
e272080f0d
commit
0648abc018
@ -1834,6 +1834,7 @@ function! s:Diff(vert,keepfocus,...) abort
|
|||||||
else
|
else
|
||||||
let file = s:buffer().expand(arg)
|
let file = s:buffer().expand(arg)
|
||||||
endif
|
endif
|
||||||
|
throw file
|
||||||
if file !~# ':' && file !~# '^/' && s:repo().git_chomp('cat-file','-t',file) =~# '^\%(tag\|commit\)$'
|
if file !~# ':' && file !~# '^/' && s:repo().git_chomp('cat-file','-t',file) =~# '^\%(tag\|commit\)$'
|
||||||
let file = file.s:buffer().path(':')
|
let file = file.s:buffer().path(':')
|
||||||
endif
|
endif
|
||||||
@ -2332,7 +2333,7 @@ function! s:Browse(bang,line1,count,...) abort
|
|||||||
else
|
else
|
||||||
let remote_for_url = remote
|
let remote_for_url = remote
|
||||||
endif
|
endif
|
||||||
if fugitive#git_version() =~# '^[01]\.|^2\.[0-6]\.'
|
if fugitive#git_version() =~# '^[01]\.\|^2\.[0-6]\.'
|
||||||
let raw = s:repo().git_chomp('config','remote.'.remote_for_url.'.url')
|
let raw = s:repo().git_chomp('config','remote.'.remote_for_url.'.url')
|
||||||
else
|
else
|
||||||
let raw = s:repo().git_chomp('remote','get-url',remote_for_url)
|
let raw = s:repo().git_chomp('remote','get-url',remote_for_url)
|
||||||
|
Loading…
Reference in New Issue
Block a user