mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
perf(git): use notify api for Git pull
This commit is contained in:
parent
95c7ef70e7
commit
a8d4a7392d
5
bundle/git.vim/autoload/git/pull.vim
vendored
5
bundle/git.vim/autoload/git/pull.vim
vendored
@ -1,4 +1,5 @@
|
|||||||
let s:JOB = SpaceVim#api#import('job')
|
let s:JOB = SpaceVim#api#import('job')
|
||||||
|
let s:NOTI = SpaceVim#api#import('notify')
|
||||||
|
|
||||||
function! git#pull#run(args)
|
function! git#pull#run(args)
|
||||||
let cmd = ['git', 'pull'] + a:args
|
let cmd = ['git', 'pull'] + a:args
|
||||||
@ -17,10 +18,10 @@ endfunction
|
|||||||
function! s:on_exit(id, data, event) abort
|
function! s:on_exit(id, data, event) abort
|
||||||
call git#logger#debug('git-pull exit data:' . string(a:data))
|
call git#logger#debug('git-pull exit data:' . string(a:data))
|
||||||
if a:data ==# 0
|
if a:data ==# 0
|
||||||
echo 'pulled done!'
|
call s:NOTI.notify('pulled done!')
|
||||||
else
|
else
|
||||||
call s:list_conflict_files()
|
call s:list_conflict_files()
|
||||||
echo 'pulled failed!'
|
call s:NOTI.notify('pulled failed!')
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user