libgit2

git_patch_to_str

Version:

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

Signature

int git_patch_to_str(char **string, git_patch *patch);

Parameters

char **
In
string

Allocated string; caller must free.

In
patch

A git_patch representing changes to one file

Returns

int

0 on success, < 0 on failure.

Versions