mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 22:03:51 -05:00
Include cwd in fugitive#Execute() result
I guess we should allow for the future possibility the working directory can be specified.
This commit is contained in:
@@ -637,8 +637,10 @@ function! s:PrepareJob(...) abort
|
|||||||
let cmd = flags + args
|
let cmd = flags + args
|
||||||
let tree = s:Tree(dir)
|
let tree = s:Tree(dir)
|
||||||
if empty(tree) || index(cmd, '--') == len(cmd) - 1
|
if empty(tree) || index(cmd, '--') == len(cmd) - 1
|
||||||
|
let dict.cwd = getcwd()
|
||||||
call extend(cmd, git + ['--git-dir=' . FugitiveGitPath(dir)], 'keep')
|
call extend(cmd, git + ['--git-dir=' . FugitiveGitPath(dir)], 'keep')
|
||||||
else
|
else
|
||||||
|
let dict.cwd = FugitiveVimPath(tree)
|
||||||
call extend(cmd, git + ['-C', FugitiveGitPath(tree)], 'keep')
|
call extend(cmd, git + ['-C', FugitiveGitPath(tree)], 'keep')
|
||||||
endif
|
endif
|
||||||
return s:JobOpts(cmd, exec_env) + [dict]
|
return s:JobOpts(cmd, exec_env) + [dict]
|
||||||
|
|||||||
Reference in New Issue
Block a user