libgit2

git_diff_patch_to_str

Version:

Get the content of a patch as a single diff text.

Signature

int git_diff_patch_to_str(char **string, git_diff_patch *patch);

Parameters

char **
In
string

Allocated string; caller must free.

In
patch

A git_diff_patch representing changes to one file

Returns

int

0 on success, < 0 on failure.

Versions