From e93d45e4ce79d89cf513627e73a58b12cd5905f2 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 19 Aug 2021 13:50:42 -0400 Subject: [PATCH] Fix constructing Git shell commands --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index fbc337c..298059e 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -673,8 +673,8 @@ function! s:BuildShell(dir, env, git, args) abort call insert(cmd, '--git-dir=' . FugitiveGitPath(a:dir)) else call extend(cmd, ['-C', FugitiveGitPath(tree)], 'keep') - if !s:cpath(tree . '/.git', dir) - call extend(cmd, ['--git-dir=' . FugitiveGitPath(dir)], 'keep') + if !s:cpath(tree . '/.git', a:dir) + call extend(cmd, ['--git-dir=' . FugitiveGitPath(a:dir)], 'keep') endif endif return pre . join(map(a:git + cmd, 's:shellesc(v:val)'))