diff options
| author | michael boulton <[email protected]> | 2020-08-18 14:14:02 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-08-18 06:14:02 -0700 |
| commit | 7883ec85de56ee55667481228282fd690fce6246 (patch) | |
| tree | 8a686eb37f0b79d2a81b05bb50e8cfcc292b796e /wrapper.c | |
| parent | 2ac9f4e69bd57a686d15176d199a3c9cc4a6bb91 (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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |
