Warn user when git rejects patch.

This commit is contained in:
Andy Stewart
2019-08-13 15:45:29 +01:00
parent 50a7a9f6cb
commit 773a5697f1

View File

@@ -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)