Skip to content

Commit

Permalink
autoload/git.vim: faulty diff raises an error (refs #52)
Browse files Browse the repository at this point in the history
  • Loading branch information
jreybert committed Dec 7, 2015
1 parent 2bbe9d9 commit a246b13
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autoload/magit/git.vim
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ function! magit#git#git_diff(filename, status, mode)
\ "--no-color --patch -- " . dev_null . " "
\ .a:filename
silent let diff_list=magit#utils#systemlist(git_cmd)
if ( v:shell_error != 0 )
echohl WarningMsg
echom "Git error: " . string(diff_list)
echom "Git cmd: " . git_cmd
echohl None
throw 'diff error'
endif
if ( empty(diff_list) )
echohl WarningMsg
echom "diff command \"" . git_cmd . "\" returned nothing"
Expand Down

0 comments on commit a246b13

Please sign in to comment.