libgit2 / git2go

Git to Go; bindings for libgit2. Like McDonald's but tastier.
MIT License
1.92k stars 316 forks source link

Allow use of libgit2 built without thread support #918

Closed pjbgf closed 1 year ago

pjbgf commented 2 years ago

Allow use of libgit2 built without thread support.

With smart transport, users using solely Managed Transports can rely on Go to deal with the multi-threading requirements of transport management.

To enable threadless libgit2 an environment variable ALLOW_THREADLESS_LIBGIT2 must be set to true.

As long as the git2go objects are not being shared across Go routines this arrangement seems to work well.

By leveraging this and the removal of unmanaged transport we have experienced a decrease in segfaults or random errors when using git2go for accessing multiple Git repositories concurrently.

Fixes #917.