diff options
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r-- | include/git2/diff.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h index 1932db029..1c2a2f83a 100644 --- a/include/git2/diff.h +++ b/include/git2/diff.h @@ -603,6 +603,17 @@ GIT_EXTERN(int) git_diff_patch_get_line_in_hunk( size_t hunk_idx, size_t line_of_hunk); +/** + * Get the content of a patch as a single diff text. + * + * @param string Allocated string; caller must free. + * @param patch The patch to generate a string from. + * @return 0 on success, <0 on failure. + */ +GIT_EXTERN(int) git_diff_patch_to_str( + char **string, + git_diff_patch *patch); + /**@}*/ |