Add LockOSThread

This commit is contained in:
Segev Finer 2020-11-10 18:51:52 +02:00
parent 58e0a0f357
commit 0476e7d58f
1 changed files with 3 additions and 0 deletions

View File

@ -516,6 +516,9 @@ func ReferenceNormalizeName(name string, flags ReferenceFormat) (string, error)
buf := (*C.char)(C.malloc(bufSize))
defer C.free(unsafe.Pointer(buf))
runtime.LockOSThread()
defer runtime.UnlockOSThread()
ecode := C.git_reference_normalize_name(buf, bufSize, cname, C.uint(flags))
if ecode < 0 {
return "", MakeGitError(ecode)