Iterate over a diff generating text output like "git diff".
This is a super easy way to generate a patch from a diff.
Returning a non-zero value from the callbacks will terminate the
iteration and cause this return GIT_EUSER
.
Callback function to output lines of the diff. This same function will be called for file headers, hunk headers, and diff lines. Fortunately, you can probably use various GIT_DIFF_LINE constants to determine what text you are given.
Reference pointer that will be passed to your callbacks.
0 on success, GIT_EUSER on non-zero callback, or error code