mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -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]:'
|
||||
let f = s:PathJoin(urlprefix, rev[1] . '/' . rev[3:-1])
|
||||
elseif rev ==# ':'
|
||||
let fdir = simplify(FugitiveActualDir(dir) . '/')
|
||||
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
|
||||
let f = urlprefix
|
||||
elseif rev =~# '^:(\%(top\|top,literal\|literal,top\|literal\))'
|
||||
let f = matchstr(rev, ')\zs.*')
|
||||
if f=~# '^\.\.\=\%(/\|$\)'
|
||||
|
||||
Reference in New Issue
Block a user