summaryrefslogtreecommitdiff
path: root/remote.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2014-12-06 02:58:28 +0100
committerCarlos Martín Nieto <[email protected]>2014-12-06 03:03:26 +0100
commit520a0425c736c7d584d21d073b08a8735dd2464f (patch)
treeaf5f03129117c9179dcdf71c11c867116fb24ab5 /remote.go
parent8c631b0c25c8de616afa2fd89378299c9d9a1439 (diff)
Add the newer missing thread-locking instances
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/remote.go b/remote.go
index faff9c5..604ef40 100644
--- a/remote.go
+++ b/remote.go
@@ -610,6 +610,9 @@ func (o *Remote) Ls(filterRefs ...string) ([]RemoteHead, error) {
var refs **C.git_remote_head
var length C.size_t
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+
if ret := C.git_remote_ls(&refs, &length, o.ptr); ret != 0 {
return nil, MakeGitError(ret)
}