Check the return code of `git_diff_patch_print`.