From 6515bd43acc28c86fcf3bea64ce8a6b3d7db19ff Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 17 May 2012 21:42:06 -0400 Subject: [PATCH] Support relative core.worktree This is based on Chen Mulong's implementation in #204, but uses the same relative path check as a8d450fcfe198d1a09676da0f98b47096db6d3fd, for better Windows support. --- plugin/fugitive.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index aaa3e13..5853526 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -208,7 +208,11 @@ function! s:repo_configured_tree() dict abort endif endif endif - return self._tree + if self._tree =~# '^\.' + return simplify(self.dir(self._tree)) + else + return self._tree + endif endfunction function! s:repo_tree(...) dict abort