Return '' for FugitiveRoute('')
This commit is contained in:
parent
ed36717a68
commit
ae2005adbb
@ -508,7 +508,7 @@ function! fugitive#Route(object, ...) abort
|
|||||||
let prefix = matchstr(a:object, '^[~$]\i*')
|
let prefix = matchstr(a:object, '^[~$]\i*')
|
||||||
let owner = expand(prefix)
|
let owner = expand(prefix)
|
||||||
return s:PlatformSlash((len(owner) ? owner : prefix) . strpart(a:object, len(prefix)))
|
return s:PlatformSlash((len(owner) ? owner : prefix) . strpart(a:object, len(prefix)))
|
||||||
elseif s:Slash(a:object) =~# '^/\|^\%(\a\a\+:\).*\%(//\|::\)' || (has('win32') ? '^\a:/' : '')
|
elseif s:Slash(a:object) =~# '^$\|^/\|^\%(\a\a\+:\).*\%(//\|::\)' . (has('win32') ? '\|^\a:/' : '')
|
||||||
return s:PlatformSlash(a:object)
|
return s:PlatformSlash(a:object)
|
||||||
elseif s:Slash(a:object) =~# '^\.\.\=\%(/\|$\)'
|
elseif s:Slash(a:object) =~# '^\.\.\=\%(/\|$\)'
|
||||||
return s:PlatformSlash(simplify(getcwd() . '/' . a:object))
|
return s:PlatformSlash(simplify(getcwd() . '/' . a:object))
|
||||||
@ -534,7 +534,7 @@ function! fugitive#Route(object, ...) abort
|
|||||||
else
|
else
|
||||||
let f = dir . f
|
let f = dir . f
|
||||||
endif
|
endif
|
||||||
elseif rev =~# '^$\|^:/$'
|
elseif rev ==# ':/'
|
||||||
let f = base
|
let f = base
|
||||||
elseif rev =~# '^\.\%(/\|$\)'
|
elseif rev =~# '^\.\%(/\|$\)'
|
||||||
let f = base . rev[1:-1]
|
let f = base . rev[1:-1]
|
||||||
|
@ -44,7 +44,7 @@ function! FugitiveReal(...) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! FugitiveRoute(...) abort
|
function! FugitiveRoute(...) abort
|
||||||
return fugitive#Route(a:0 ? a:1 : '', FugitiveGitDir(a:0 > 1 ? a:2 : -1))
|
return fugitive#Route(a:0 ? a:1 : ':/', FugitiveGitDir(a:0 > 1 ? a:2 : -1))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! FugitivePath(...) abort
|
function! FugitivePath(...) abort
|
||||||
|
Loading…
x
Reference in New Issue
Block a user