libgit2

git_diff_to_buf

Version:

Produce the complete formatted text output from a diff into a buffer.

Signature

int git_diff_to_buf(git_buf *out, git_diff *diff, git_diff_format_t format);

Parameters

In
out

A pointer to a user-allocated git_buf that will contain the diff text

In
diff

A git_diff generated by one of the above functions.

In
format

A git_diff_format_t value to pick the text format.

Returns

int

0 on success or error code

Versions