commit: add thread locking to signature extraction

This commit is contained in:
Carlos Martín Nieto 2017-07-07 23:24:54 +02:00
parent 29c0b73007
commit 5d466ffbc0
1 changed files with 6 additions and 4 deletions

View File

@ -35,8 +35,10 @@ func (c Commit) ExtractSignature() (string, string, error) {
defer C.git_buf_free(&c_signature)
oid := c.Id()
repo := C.git_commit_owner(c.cast_ptr)
runtime.LockOSThread()
defer runtime.UnlockOSThread()
ret := C.git_commit_extract_signature(&c_signature, &c_signed, repo, oid.toC(), nil)
if ret < 0 {