summaryrefslogtreecommitdiff
path: root/wrapper.c
diff options
context:
space:
mode:
authormichael boulton <[email protected]>2020-08-18 14:14:02 +0100
committerGitHub <[email protected]>2020-08-18 06:14:02 -0700
commit7883ec85de56ee55667481228282fd690fce6246 (patch)
tree8a686eb37f0b79d2a81b05bb50e8cfcc292b796e /wrapper.c
parent2ac9f4e69bd57a686d15176d199a3c9cc4a6bb91 (diff)
More diff functionality (#629)
This PR adds - The ability to apply a Diff object to the repo - Support for git_apply_hunk_cb and git_apply_delta_cb callbacks in options for applying the diffs - The ability to import a diff from a raw buffer (for example, one exported by ToBuf) into a Diff object associated with the repo - Tests for the above
Diffstat (limited to 'wrapper.c')
-rw-r--r--wrapper.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wrapper.c b/wrapper.c
index c4a5ff0..4308ae4 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -6,6 +6,12 @@
typedef int (*gogit_submodule_cbk)(git_submodule *sm, const char *name, void *payload);
+void _go_git_populate_apply_cb(git_apply_options *options)
+{
+ options->delta_cb = (git_apply_delta_cb)deltaApplyCallback;
+ options->hunk_cb = (git_apply_hunk_cb)hunkApplyCallback;
+}
+
void _go_git_populate_remote_cb(git_clone_options *opts)
{
opts->remote_cb = (git_remote_create_cb)remoteCreateCallback;