diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 06f06de..4bb11d8 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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] diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 3db9f7a..c33e368 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -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