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:
Tim Pope
2022-07-22 01:23:52 -04:00
parent 23b321b740
commit 9a13fc87c4

View File

@@ -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
elseif rev =~# '^:(\%(top\|top,literal\|literal,top\|literal\))'
let f = matchstr(rev, ')\zs.*')
if f=~# '^\.\.\=\%(/\|$\)'