]> git.proxmox.com Git - libgit2.git/blobdiff - src/patch.h
New upstream version 1.4.3+dfsg.1
[libgit2.git] / src / patch.h
index b818c5cbe72559aaaa71211376629b383206def6..1e1471ed613abe8f11a0bbc6479e6753bd6bfd10 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef INCLUDE_patch_h__
 #define INCLUDE_patch_h__
 
+#include "common.h"
+
 #include "git2/patch.h"
 #include "array.h"
 
@@ -50,6 +52,18 @@ extern int git_patch_line_stats(
        size_t *total_dels,
        const git_patch *patch);
 
+/** Options for parsing patch files. */
+typedef struct {
+       /**
+        * The length of the prefix (in path segments) for the filenames.
+        * This prefix will be removed when looking for files.  The default is 1.
+        */
+       uint32_t prefix_len;
+} git_patch_options;
+
+#define GIT_PATCH_OPTIONS_INIT { 1 }
+
+extern int git_patch__to_buf(git_str *out, git_patch *patch);
 extern void git_patch_free(git_patch *patch);
 
 #endif