From 9a13fc87c4ab83ea81e71ccad9b846a5eb31a998 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 22 Jul 2022 01:23:52 -0400 Subject: [PATCH] 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. --- autoload/fugitive.vim | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 10c0e79..5be39f4 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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=~# '^\.\.\=\%(/\|$\)'