The git_patch is a newly created object contains the text diffs
for the delta. You have to call git_patch_free() when you are
done with it. You can use the patch object to loop over all the hunks
and lines in the diff of the one delta.
For an unchanged file or a binary file, no git_patch will be
created, the output will be set to null, and the binary flag will be
set true in the git_diff_delta structure.
It is okay to pass null for either of the output parameters; if you pass
null for the git_patch, then the text diff will not be calculated.
Return a patch for an entry in the diff list.
The git_patch is a newly created object contains the text diffs for the delta. You have to call git_patch_free() when you are done with it. You can use the patch object to loop over all the hunks and lines in the diff of the one delta.
For an unchanged file or a binary file, no git_patch will be created, the output will be set to null, and the binary flag will be set true in the git_diff_delta structure.
It is okay to pass null for either of the output parameters; if you pass null for the git_patch, then the text diff will not be calculated.