Move os thread lock to outer scope in defaultapplyoptions
This commit is contained in:
parent
633f7639db
commit
05a41f164c
5
diff.go
5
diff.go
|
@ -916,11 +916,12 @@ func deltaApplyCallback(_delta *C.git_diff_delta, _payload unsafe.Pointer) C.int
|
|||
func DefaultApplyOptions() (*ApplyOptions, error) {
|
||||
opts := C.git_apply_options{}
|
||||
|
||||
ecode := C.git_apply_options_init(&opts, C.GIT_APPLY_OPTIONS_VERSION)
|
||||
if int(ecode) != 0 {
|
||||
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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue