source-controller/pkg/git/libgit2
Paulo Gomes bfa4e38b84
libgit2: dispose connections in SubTransport.Close
The average SubTransport lifecycle encompass two Actions calls. Previously,
it was attempted to share the same connection across both calls. That did
not work as some Git Servers do not support multiple sessions from the same
connection. The implementation was not fully transitioned into the
"one connection per action" model, which led to connection being leaked.

The transition to RW mutex was to avoid the unnecessary blocking in the
goroutine at the start of the second action call.

It is worth mentioning that now when the context is done,  the client level
resources (connection) will also be freed. This ensures that SSH connections
will not outlive the subtransport.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-08 19:39:50 +01:00
..
managed libgit2: dispose connections in SubTransport.Close 2022-06-08 19:39:50 +01:00
checkout.go libgit2: return CheckoutTag with LastRevision 2022-06-03 14:00:23 +05:30
checkout_test.go libgit2: return CheckoutTag with LastRevision 2022-06-03 14:00:23 +05:30
libgit2.go gogit: allow checkout of commit without branch 2021-10-27 00:43:31 +05:30
managed_test.go libgit2: fix checkout logic for CheckoutBranch 2022-06-01 14:14:28 +05:30
transport.go fix panics on unmanaged http and proxy on managed http 2022-05-27 14:01:23 +05:30
transport_test.go fix panics on unmanaged http and proxy on managed http 2022-05-27 14:01:23 +05:30