mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
Accept alternate forms of Fugitive URL
This is to prepare for a potential transition to a URL replacement that isn't mutilated by simplify().
This commit is contained in:
@@ -59,8 +59,8 @@ endfunction
|
||||
|
||||
function! FugitiveExtractGitDir(path) abort
|
||||
let path = s:shellslash(a:path)
|
||||
if path =~# '^fugitive://.*//'
|
||||
return matchstr(path, '\C^fugitive://\zs.\{-\}\ze//')
|
||||
if path =~# '^fugitive:'
|
||||
return matchstr(path, '\C^fugitive:\%(//\)\=\zs.\{-\}\ze\%(//\|::\|$\)')
|
||||
elseif isdirectory(path)
|
||||
let path = fnamemodify(path, ':p:s?/$??')
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user