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 owner = expand(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)
|
||||
elseif s:Slash(a:object) =~# '^\.\.\=\%(/\|$\)'
|
||||
return s:PlatformSlash(simplify(getcwd() . '/' . a:object))
|
||||
@ -534,7 +534,7 @@ function! fugitive#Route(object, ...) abort
|
||||
else
|
||||
let f = dir . f
|
||||
endif
|
||||
elseif rev =~# '^$\|^:/$'
|
||||
elseif rev ==# ':/'
|
||||
let f = base
|
||||
elseif rev =~# '^\.\%(/\|$\)'
|
||||
let f = base . rev[1:-1]
|
||||
|
@ -44,7 +44,7 @@ function! FugitiveReal(...) abort
|
||||
endfunction
|
||||
|
||||
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
|
||||
|
||||
function! FugitivePath(...) abort
|
||||
|
Loading…
Reference in New Issue
Block a user