Serialize the patch to text via callback.
Returning a non-zero value from the callback will terminate the iteration and return that value to the caller.
Callback function to output lines of the patch. Will be called for file headers, hunk headers, and diff lines.
Reference pointer that will be passed to your callbacks.
0 on success, non-zero callback return value, or error code