motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit ae2005adbbd656772a2ec4155747e1c6cef24ab2 (tree)
parent ed36717a686e2cba5a5338c2ba468d97e9a42968
Author: Tim Pope <code@tpope.net>
Date:   Sun, 19 Aug 2018 17:49:45 -0400

Return '' for FugitiveRoute('')

Diffstat:
Mautoload/fugitive.vim | 4++--
Mplugin/fugitive.vim | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 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 @@ -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