summaryrefslogtreecommitdiff
path: root/src/diff.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-08-23 23:38:39 -0500
committerEdward Thomson <ethomson@github.com>2016-08-24 09:08:57 -0500
commitb859faa61ce3f1fda5c29ac1e72a3d58fee2ede6 (patch)
tree976a27f8827db4200a172720b547fbf7ec1db119 /src/diff.h
parentc60210d36780a39db669e52d6d592d339c6a2ed3 (diff)
downloadlibgit2-b859faa61ce3f1fda5c29ac1e72a3d58fee2ede6.tar.gz
Teach `git_patch_from_diff` about parsed diffsethomson/patch_from_diff
Ensure that `git_patch_from_diff` can return the patch for parsed diffs, not just generate a patch for a generated diff.
Diffstat (limited to 'src/diff.h')
-rw-r--r--src/diff.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/diff.h b/src/diff.h
index 2c0e52ca2..5750d2a09 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -8,6 +8,7 @@
#define INCLUDE_diff_h__
#include "git2/diff.h"
+#include "git2/patch.h"
#include "git2/sys/diff.h"
#include "git2/oid.h"
@@ -44,6 +45,7 @@ struct git_diff {
int (*pfxcomp)(const char *str, const char *pfx);
int (*entrycomp)(const void *a, const void *b);
+ int (*patch_fn)(git_patch **out, git_diff *diff, size_t idx);
void (*free_fn)(git_diff *diff);
};