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 9bc425e94338fb1581db6cbd2a07686c2cc2a36e (tree)
parent 65346f0926c9f7be0c37b4a57bd0820023ac2361
Author: Tim Pope <code@tpope.net>
Date:   Mon, 16 Jul 2018 21:36:50 -0400

Add missing function

Diffstat:
Mautoload/fugitive.vim | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -433,7 +433,12 @@ function! s:DirCommitFile(path) abort if empty(vals) return ['', '', ''] endif - return [vals[1], (vals[2] =~# '^.$' ? ':' : '') . vals[2], vals[3]] + return vals[1:3] +endfunction + +function! s:DirRev(url) abort + let [dir, commit, file] = s:DirCommitFile(a:url) + return [dir, (commit =~# '^.$' ? ':' : '') . commit . substitute(file, '^/', ':', '')] endfunction function! fugitive#Path(url) abort