Fix extra slash generating work tree filenames

Closes https://github.com/tpope/vim-fugitive/issues/1069
This commit is contained in:
Tim Pope 2018-07-30 19:40:47 -04:00
parent a877908acd
commit c9c406a118

View File

@ -296,7 +296,7 @@ function! s:repo_translate(spec, ...) dict abort
elseif empty(rev) || rev ==# '/.' elseif empty(rev) || rev ==# '/.'
return self.tree() return self.tree()
elseif rev =~# '^\.\=/' elseif rev =~# '^\.\=/'
let f = self.tree(substitute(rev, '^\.', '', '')) let f = self.tree(substitute(rev, '^\.\=/', '', ''))
elseif rev =~# '^:[0-3]:/\@!' elseif rev =~# '^:[0-3]:/\@!'
let f = 'fugitive://' . dir . '//' . rev[1] . '/' . rev[3:-1] let f = 'fugitive://' . dir . '//' . rev[1] . '/' . rev[3:-1]
elseif rev ==# ':' elseif rev ==# ':'