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 4f7af188fec24330e7dff99c8758588ae9780347 (tree)
parent 24e9b492fed51b1390b0f7984a047cdef776db7d
Author: Tim Pope <code@tpope.net>
Date:   Tue, 27 Mar 2012 13:33:04 -0400

Fix repo().translate with symlinked git-dir

Closes #178.

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

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -232,8 +232,12 @@ endfunction function! s:repo_translate(spec) dict abort if a:spec ==# '.' || a:spec ==# '/.' return self.bare() ? self.dir() : self.tree() + elseif a:spec =~# '^/\=\.git$' && self.bare() + return self.dir() + elseif a:spec =~# '^/\=\.git/' + return self.dir(s:sub(a:spec, '^/=\.git/', '')) elseif a:spec =~# '^/' - return fnamemodify(self.dir(),':h').a:spec + return self.tree().a:spec elseif a:spec =~# '^:[0-3]:' return 'fugitive://'.self.dir().'//'.a:spec[1].'/'.a:spec[3:-1] elseif a:spec ==# ':'