From 4f7af188fec24330e7dff99c8758588ae9780347 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 27 Mar 2012 13:33:04 -0400 Subject: [PATCH] Fix repo().translate with symlinked git-dir Closes #178. --- plugin/fugitive.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 1570924..57999b6 100644 --- 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 ==# ':'