Fix the build (#638)
As it turns out, the CI was not enabled for the release-0.28 branch.
This commit is contained in:
parent
61ea21fbd6
commit
4883fbe872
17
diff.go
17
diff.go
|
@ -861,7 +861,6 @@ type ApplyDeltaCallback func(*DiffDelta) (apply bool, err error)
|
||||||
type ApplyOptions struct {
|
type ApplyOptions struct {
|
||||||
ApplyHunkCallback ApplyHunkCallback
|
ApplyHunkCallback ApplyHunkCallback
|
||||||
ApplyDeltaCallback ApplyDeltaCallback
|
ApplyDeltaCallback ApplyDeltaCallback
|
||||||
Flags uint
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//export hunkApplyCallback
|
//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.
|
// DefaultApplyOptions returns default options for applying diffs or patches.
|
||||||
func DefaultApplyOptions() (*ApplyOptions, error) {
|
func DefaultApplyOptions() (*ApplyOptions, error) {
|
||||||
opts := C.git_apply_options{}
|
opts := C.git_apply_options{
|
||||||
|
version: C.GIT_APPLY_OPTIONS_VERSION,
|
||||||
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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return applyOptionsFromC(&opts), nil
|
return applyOptionsFromC(&opts), nil
|
||||||
|
@ -939,7 +931,6 @@ func (a *ApplyOptions) toC() *C.git_apply_options {
|
||||||
|
|
||||||
opts := &C.git_apply_options{
|
opts := &C.git_apply_options{
|
||||||
version: C.GIT_APPLY_OPTIONS_VERSION,
|
version: C.GIT_APPLY_OPTIONS_VERSION,
|
||||||
flags: C.uint(a.Flags),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if a.ApplyDeltaCallback != nil || a.ApplyHunkCallback != nil {
|
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 {
|
func applyOptionsFromC(opts *C.git_apply_options) *ApplyOptions {
|
||||||
return &ApplyOptions{
|
return &ApplyOptions{}
|
||||||
Flags: uint(opts.flags),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ApplyLocation represents the possible application locations for applying
|
// ApplyLocation represents the possible application locations for applying
|
||||||
|
|
Loading…
Reference in New Issue