summaryrefslogtreecommitdiff
path: root/remote.go
diff options
context:
space:
mode:
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/remote.go b/remote.go
index 96cc4c1..faff9c5 100644
--- a/remote.go
+++ b/remote.go
@@ -249,6 +249,10 @@ func (r *Remote) Free() {
func (repo *Repository) ListRemotes() ([]string, error) {
var r C.git_strarray
+
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+
ecode := C.git_remote_list(&r, repo.ptr)
if ecode < 0 {
return nil, MakeGitError(ecode)
@@ -573,6 +577,9 @@ func (o *Remote) Fetch(refspecs []string, sig *Signature, msg string) error {
crefspecs.strings = makeCStringsFromStrings(refspecs)
defer freeStrarray(&crefspecs)
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+
ret := C.git_remote_fetch(o.ptr, &crefspecs, csig, cmsg)
if ret < 0 {
return MakeGitError(ret)