From 4883fbe87201c5aba92be18d54fd786072076e56 Mon Sep 17 00:00:00 2001 From: lhchavez Date: Tue, 18 Aug 2020 06:35:53 -0700 Subject: [PATCH] Fix the build (#638) As it turns out, the CI was not enabled for the release-0.28 branch. --- diff.go | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/diff.go b/diff.go index 9d17dd7..9b18f96 100644 --- a/diff.go +++ b/diff.go @@ -861,7 +861,6 @@ type ApplyDeltaCallback func(*DiffDelta) (apply bool, err error) type ApplyOptions struct { ApplyHunkCallback ApplyHunkCallback ApplyDeltaCallback ApplyDeltaCallback - Flags uint } //export hunkApplyCallback @@ -918,15 +917,8 @@ func deltaApplyCallback(_delta *C.git_diff_delta, _payload unsafe.Pointer) C.int // DefaultApplyOptions returns default options for applying diffs or patches. func DefaultApplyOptions() (*ApplyOptions, error) { - opts := C.git_apply_options{} - - runtime.LockOSThread() - defer runtime.UnlockOSThread() - - ecode := C.git_apply_options_init(&opts, C.GIT_APPLY_OPTIONS_VERSION) - if int(ecode) != 0 { - - return nil, MakeGitError(ecode) + opts := C.git_apply_options{ + version: C.GIT_APPLY_OPTIONS_VERSION, } return applyOptionsFromC(&opts), nil @@ -939,7 +931,6 @@ func (a *ApplyOptions) toC() *C.git_apply_options { opts := &C.git_apply_options{ version: C.GIT_APPLY_OPTIONS_VERSION, - flags: C.uint(a.Flags), } if a.ApplyDeltaCallback != nil || a.ApplyHunkCallback != nil { @@ -951,9 +942,7 @@ func (a *ApplyOptions) toC() *C.git_apply_options { } func applyOptionsFromC(opts *C.git_apply_options) *ApplyOptions { - return &ApplyOptions{ - Flags: uint(opts.flags), - } + return &ApplyOptions{} } // ApplyLocation represents the possible application locations for applying