Skip to content

Commit 36bbaf0

Browse files
authored
Merge pull request #743 from fluxcd/libgit2-transport-opt-ctx
libgit2: Pass ctx to all the transport opts
2 parents a6f19b3 + e0883ff commit 36bbaf0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/git/libgit2/checkout.go

+3
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ func (c *CheckoutTag) Checkout(ctx context.Context, path, url string, opts *git.
238238
TargetURL: url,
239239
AuthOpts: opts,
240240
ProxyOptions: &git2go.ProxyOptions{Type: git2go.ProxyTypeAuto},
241+
Context: ctx,
241242
})
242243
url = opts.TransportOptionsURL
243244
remoteCallBacks := managed.RemoteCallbacks()
@@ -351,6 +352,7 @@ func (c *CheckoutCommit) Checkout(ctx context.Context, path, url string, opts *g
351352
TargetURL: url,
352353
AuthOpts: opts,
353354
ProxyOptions: &git2go.ProxyOptions{Type: git2go.ProxyTypeAuto},
355+
Context: ctx,
354356
})
355357
url = opts.TransportOptionsURL
356358
remoteCallBacks = managed.RemoteCallbacks()
@@ -395,6 +397,7 @@ func (c *CheckoutSemVer) Checkout(ctx context.Context, path, url string, opts *g
395397
TargetURL: url,
396398
AuthOpts: opts,
397399
ProxyOptions: &git2go.ProxyOptions{Type: git2go.ProxyTypeAuto},
400+
Context: ctx,
398401
})
399402
url = opts.TransportOptionsURL
400403
remoteCallBacks = managed.RemoteCallbacks()

0 commit comments

Comments
 (0)