mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -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(
|
||||
\ gitgutter#utility#cd_cmd(bufnr, g:gitgutter_git_executable.' '.g:gitgutter_git_args.' apply --cached --unidiff-zero - '),
|
||||
\ diff)
|
||||
if v:shell_error
|
||||
call gitgutter#utility#warn('patch does not apply')
|
||||
endif
|
||||
|
||||
" Refresh gitgutter's view of buffer.
|
||||
call gitgutter#process_buffer(bufnr, 1)
|
||||
|
||||
Reference in New Issue
Block a user