libgit2

git_diff_print_callback__to_file_handle

Version:

Diff print callback that writes to stdio FILE handle.

This function is provided not for you to call it directly, but instead so you can use it as a function pointer to the git_diff_print or git_patch_print APIs. When using those APIs, you specify a callback to actually handle the diff and/or patch data.

Use this callback to easily write that data to a stdio FILE handle. You must pass a FILE * value (such as stdout or stderr or the return value from fopen()) as the payload to the git_diff_print and/or git_patch_print function. If you pass NULL, this will write data to stdout.

Signature

int git_diff_print_callback__to_file_handle(const git_diff_delta *delta, const git_diff_hunk *hunk, const git_diff_line *line, void *payload);

Parameters

void *
In
payload

Returns

int

Versions