Propagate the correct VCS
This commit is contained in:
parent
0df130ac6e
commit
d2fda2847f
@ -34,7 +34,8 @@ endfunction
|
|||||||
" Function: s:callback_exit {{{1
|
" Function: s:callback_exit {{{1
|
||||||
function! s:callback_exit(_job_id, exitcode, _event) dict abort
|
function! s:callback_exit(_job_id, exitcode, _event) dict abort
|
||||||
call sy#verbose('Running callback_exit().')
|
call sy#verbose('Running callback_exit().')
|
||||||
call s:get_diff_end(a:exitcode, join(self.stdoutbuf, "\n"), self.do_register)
|
call s:get_diff_end(a:exitcode, self.vcs, join(self.stdoutbuf, "\n"),
|
||||||
|
\ self.do_register)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Function: sy#get_diff_start {{{1
|
" Function: sy#get_diff_start {{{1
|
||||||
@ -50,6 +51,7 @@ function! sy#repo#get_diff_start(vcs, do_register) abort
|
|||||||
try
|
try
|
||||||
let s:job_id_git = jobstart(cmd, {
|
let s:job_id_git = jobstart(cmd, {
|
||||||
\ 'stdoutbuf': [],
|
\ 'stdoutbuf': [],
|
||||||
|
\ 'vcs': a:vcs,
|
||||||
\ 'do_register': a:do_register,
|
\ 'do_register': a:do_register,
|
||||||
\ 'on_stdout': function('s:callback_stdout_nvim'),
|
\ 'on_stdout': function('s:callback_stdout_nvim'),
|
||||||
\ 'on_exit': function('s:callback_exit'),
|
\ 'on_exit': function('s:callback_exit'),
|
||||||
@ -59,14 +61,14 @@ function! sy#repo#get_diff_start(vcs, do_register) abort
|
|||||||
endtry
|
endtry
|
||||||
else
|
else
|
||||||
let diff = s:run(g:signify_vcs_cmds[a:vcs], b:sy_info.path)
|
let diff = s:run(g:signify_vcs_cmds[a:vcs], b:sy_info.path)
|
||||||
call s:get_diff_end(v:shell_error, diff, a:do_register)
|
call s:get_diff_end(v:shell_error, a:vcs, diff, a:do_register)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Function: s:get_diff_end {{{1
|
" Function: s:get_diff_end {{{1
|
||||||
function! s:get_diff_end(exitcode, diff, do_register) abort
|
function! s:get_diff_end(exitcode, type, diff, do_register) abort
|
||||||
if !a:exitcode
|
if !a:exitcode
|
||||||
let b:sy.type = 'git'
|
let b:sy.type = a:type
|
||||||
endif
|
endif
|
||||||
if !a:do_register
|
if !a:do_register
|
||||||
let b:sy.id_top = g:id_top
|
let b:sy.id_top = g:id_top
|
||||||
|
Loading…
x
Reference in New Issue
Block a user