git_patch_print

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.

extern (C) nothrow @nogc
int
git_patch_print

Parameters

patch .git_patch*

A git_patch representing changes to one file

print_cb libgit2_d.diff.git_diff_line_cb

Callback function to output lines of the patch. Will be called for file headers, hunk headers, and diff lines.

payload void*

Reference pointer that will be passed to your callbacks.

Return Value

Type: int

0 on success, non-zero callback return value, or error code

Meta