summaryrefslogtreecommitdiff
path: root/reset.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 /reset.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 'reset.go')
-rw-r--r--reset.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/reset.go b/reset.go
index 155b58b..6a2ed9d 100644
--- a/reset.go
+++ b/reset.go
@@ -19,7 +19,7 @@ func (r *Repository) ResetToCommit(commit *Commit, resetType ResetType, opts *Ch
defer runtime.UnlockOSThread()
var err error
- cOpts := opts.toC(&err)
+ cOpts := populateCheckoutOptions(&C.git_checkout_options{}, opts, &err)
defer freeCheckoutOptions(cOpts)
ret := C.git_reset(r.ptr, commit.ptr, C.git_reset_t(resetType), cOpts)