mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 13:53:51 -05:00
Move status buffer to fugitive:// URL
Having already implemented this for better symlink support, we may as well leverage it to phase out the "index" path leaky abstraction.
This commit is contained in:
@@ -1846,18 +1846,7 @@ function! fugitive#Find(object, ...) abort
|
|||||||
elseif rev =~# '^:[0-3]:'
|
elseif rev =~# '^:[0-3]:'
|
||||||
let f = s:PathJoin(urlprefix, rev[1] . '/' . rev[3:-1])
|
let f = s:PathJoin(urlprefix, rev[1] . '/' . rev[3:-1])
|
||||||
elseif rev ==# ':'
|
elseif rev ==# ':'
|
||||||
let fdir = simplify(FugitiveActualDir(dir) . '/')
|
let f = urlprefix
|
||||||
let f = fdir . 'index'
|
|
||||||
if !s:cpath(dir . '/', fdir)
|
|
||||||
let f = urlprefix
|
|
||||||
elseif len($GIT_INDEX_FILE)
|
|
||||||
let index_dir = substitute(s:GitIndexFileEnv(), '[^/]\+$', '', '')
|
|
||||||
if s:cpath(index_dir, fdir)
|
|
||||||
let f = s:GitIndexFileEnv()
|
|
||||||
elseif s:cpath(resolve(index_dir), fdir)
|
|
||||||
let f = resolve(s:GitIndexFileEnv())
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
elseif rev =~# '^:(\%(top\|top,literal\|literal,top\|literal\))'
|
elseif rev =~# '^:(\%(top\|top,literal\|literal,top\|literal\))'
|
||||||
let f = matchstr(rev, ')\zs.*')
|
let f = matchstr(rev, ')\zs.*')
|
||||||
if f=~# '^\.\.\=\%(/\|$\)'
|
if f=~# '^\.\.\=\%(/\|$\)'
|
||||||
|
|||||||
Reference in New Issue
Block a user