From 10c67474a89c298172a6703b91980ea37c60d5e5 Mon Sep 17 00:00:00 2001 From: lhchavez Date: Thu, 10 Dec 2020 07:19:41 -0800 Subject: 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. --- reset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'reset.go') 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) -- cgit v1.2.3