summaryrefslogtreecommitdiff
path: root/include/git2/patch.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2014-04-08 17:18:47 -0700
committerEdward Thomson <ethomson@github.com>2016-05-26 11:36:11 -0500
commitd34f68261ef95b517944d4fa89ee13b4a68d3cb4 (patch)
tree686b92a0e7174b891bd4e5a61e480acfc1be5002 /include/git2/patch.h
parent7cb904ba4443c22ff5396769b7d07a7f329c0102 (diff)
downloadlibgit2-d34f68261ef95b517944d4fa89ee13b4a68d3cb4.tar.gz
Patch parsing from patch files
Diffstat (limited to 'include/git2/patch.h')
-rw-r--r--include/git2/patch.h13
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
/**@}*/