summaryrefslogtreecommitdiff
path: root/patch.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-12-10 07:19:41 -0800
committerGitHub <[email protected]>2020-12-10 07:19:41 -0800
commit10c67474a89c298172a6703b91980ea37c60d5e5 (patch)
tree8b32fd2ce9540e01e90ddd09b59969d85832dc25 /patch.go
parente28cce87c7551bffa1f4602ff492348f9a8cba60 (diff)
More callback refactoring (#713)
This change: * Gets rid of the `.toC()` functions for Options objects, since they were redundant with the `populateXxxOptions()`. * Adds support for `errorTarget` to the `RemoteOptions`, since they are used in the same stack for some functions (like `Fetch()`). Now for those cases, the error returned by the callback will be preserved as-is.
Diffstat (limited to 'patch.go')
-rw-r--r--patch.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/patch.go b/patch.go
index 6441751..b2595f1 100644
--- a/patch.go
+++ b/patch.go
@@ -78,7 +78,7 @@ func (v *Repository) PatchFromBuffers(oldPath, newPath string, oldBuf, newBuf []
defer C.free(unsafe.Pointer(cNewPath))
var err error
- copts := opts.toC(v, &err)
+ copts := populateDiffOptions(&C.git_diff_options{}, opts, v, &err)
defer freeDiffOptions(copts)
runtime.LockOSThread()