diff options
| author | lhchavez <[email protected]> | 2021-09-05 15:44:18 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-05 15:44:18 -0700 |
| commit | f1fa96c7b7f548389c7560d3a1a0bce83be56c9f (patch) | |
| tree | d78a98f00e1d1e1419ca14223784f15db2de2b18 /git.go | |
| parent | dbe032c347b1a1308a4b880e7c5a06d8dfb4d507 (diff) | |
Add support for custom smart transports (#806)
This change adds support for git smart transports. This will be then
used to implement http, https, and ssh transports that don't rely on the
libgit2 library.
Diffstat (limited to 'git.go')
| -rw-r--r-- | git.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -128,6 +128,7 @@ var ( type doNotCompare [0]func() var pointerHandles *HandleList +var remotePointers *remotePointerList func init() { initLibGit2() @@ -135,6 +136,7 @@ func init() { func initLibGit2() { pointerHandles = NewHandleList() + remotePointers = newRemotePointerList() C.git_libgit2_init() @@ -160,7 +162,11 @@ func initLibGit2() { // After this is called, invoking any function from this library will result in // undefined behavior, so make sure this is called carefully. func Shutdown() { + if err := unregisterManagedTransports(); err != nil { + panic(err) + } pointerHandles.Clear() + remotePointers.clear() C.git_libgit2_shutdown() } |
