From 1b7e4070f5f7b7522422f5b00a75b323cc314daf Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 8 Oct 2011 16:03:50 -0400 Subject: [PATCH] Fix bare repository support Closes #117. --- plugin/fugitive.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index fb6c960..de7f2c4 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -445,6 +445,8 @@ function! s:buffer_path(...) dict abort let rev = matchstr(self.spec(),'^fugitive://.\{-\}//\zs.*') if rev != '' let rev = s:sub(rev,'\w*','') + elseif self.repo().bare() + let rev = '/.git'.self.spec()[strlen(self.repo().dir()) : -1] else let rev = self.spec()[strlen(self.repo().tree()) : -1] endif