mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 03:53:47 -05:00
Warn user when git rejects patch.
This commit is contained in:
@@ -234,6 +234,9 @@ function! s:stage(hunk_diff)
|
|||||||
call gitgutter#utility#system(
|
call gitgutter#utility#system(
|
||||||
\ gitgutter#utility#cd_cmd(bufnr, g:gitgutter_git_executable.' '.g:gitgutter_git_args.' apply --cached --unidiff-zero - '),
|
\ gitgutter#utility#cd_cmd(bufnr, g:gitgutter_git_executable.' '.g:gitgutter_git_args.' apply --cached --unidiff-zero - '),
|
||||||
\ diff)
|
\ diff)
|
||||||
|
if v:shell_error
|
||||||
|
call gitgutter#utility#warn('patch does not apply')
|
||||||
|
endif
|
||||||
|
|
||||||
" Refresh gitgutter's view of buffer.
|
" Refresh gitgutter's view of buffer.
|
||||||
call gitgutter#process_buffer(bufnr, 1)
|
call gitgutter#process_buffer(bufnr, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user