]> git.proxmox.com Git - libgit2.git/blobdiff - src/patch_parse.h
New upstream version 1.4.3+dfsg.1
[libgit2.git] / src / patch_parse.h
index da56dad7c70b3c40f9a7a4439a1b4b46ce630b9c..140629da857bad48977d04718cc90d01f5e3cf32 100644 (file)
@@ -7,22 +7,17 @@
 #ifndef INCLUDE_patch_parse_h__
 #define INCLUDE_patch_parse_h__
 
+#include "common.h"
+
+#include "parse.h"
+#include "patch.h"
+
 typedef struct {
        git_refcount rc;
 
-       /* Original content buffer */
-       const char *content;
-       size_t content_len;
-
        git_patch_options opts;
 
-       /* The remaining (unparsed) buffer */
-       const char *remain;
-       size_t remain_len;
-
-       const char *line;
-       size_t line_len;
-       size_t line_num;
+       git_parse_ctx parse_ctx;
 } git_patch_parse_ctx;
 
 extern git_patch_parse_ctx *git_patch_parse_ctx_init(
@@ -51,4 +46,6 @@ extern int git_patch_parse(
        git_patch **out,
        git_patch_parse_ctx *ctx);
 
+extern int git_patch_parsed_from_diff(git_patch **, git_diff *, size_t);
+
 #endif