diff options
Diffstat (limited to 'include/git2/patch.h')
| -rw-r--r-- | include/git2/patch.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/patch.h b/include/git2/patch.h index 790cb74fc..aa8729c9c 100644 --- a/include/git2/patch.h +++ b/include/git2/patch.h @@ -267,6 +267,19 @@ GIT_EXTERN(int) git_patch_to_buf( git_buf *out, git_patch *patch); +/** + * Create a patch from the contents of a patch file. + * + * @param out The patch to be created + * @param patchfile The contents of a patch file + * @param patchfile_len The length of the patch file + * @return 0 on success, <0 on failure. + */ +GIT_EXTERN(int) git_patch_from_patchfile( + git_patch **out, + const char *patchfile, + size_t patchfile_len); + GIT_END_DECL /**@}*/ |
