diff --git a/pkg/git/libgit2/checkout.go b/pkg/git/libgit2/checkout.go index e0c4d1ed..dbf0b403 100644 --- a/pkg/git/libgit2/checkout.go +++ b/pkg/git/libgit2/checkout.go @@ -63,7 +63,7 @@ func (c *CheckoutBranch) Checkout(ctx context.Context, path, url string, opts *g repo, err := git2go.Clone(url, path, &git2go.CloneOptions{ FetchOptions: &git2go.FetchOptions{ DownloadTags: git2go.DownloadTagsNone, - RemoteCallbacks: remoteCallbacks(opts), + RemoteCallbacks: RemoteCallbacks(opts), }, CheckoutBranch: c.Branch, }) @@ -92,7 +92,7 @@ func (c *CheckoutTag) Checkout(ctx context.Context, path, url string, opts *git. repo, err := git2go.Clone(url, path, &git2go.CloneOptions{ FetchOptions: &git2go.FetchOptions{ DownloadTags: git2go.DownloadTagsAll, - RemoteCallbacks: remoteCallbacks(opts), + RemoteCallbacks: RemoteCallbacks(opts), }, }) if err != nil { @@ -115,7 +115,7 @@ func (c *CheckoutCommit) Checkout(ctx context.Context, path, url string, opts *g repo, err := git2go.Clone(url, path, &git2go.CloneOptions{ FetchOptions: &git2go.FetchOptions{ DownloadTags: git2go.DownloadTagsNone, - RemoteCallbacks: remoteCallbacks(opts), + RemoteCallbacks: RemoteCallbacks(opts), }, }) if err != nil { @@ -146,7 +146,7 @@ func (c *CheckoutSemVer) Checkout(ctx context.Context, path, url string, opts *g repo, err := git2go.Clone(url, path, &git2go.CloneOptions{ FetchOptions: &git2go.FetchOptions{ DownloadTags: git2go.DownloadTagsAll, - RemoteCallbacks: remoteCallbacks(opts), + RemoteCallbacks: RemoteCallbacks(opts), }, }) if err != nil { diff --git a/pkg/git/libgit2/transport.go b/pkg/git/libgit2/transport.go index 7fdd1490..c9fb56c5 100644 --- a/pkg/git/libgit2/transport.go +++ b/pkg/git/libgit2/transport.go @@ -39,9 +39,9 @@ var ( now = time.Now ) -// remoteCallbacks constructs RemoteCallbacks with credentialsCallback and +// RemoteCallbacks constructs RemoteCallbacks with credentialsCallback and // certificateCallback, and the given options if the given opts is not nil. -func remoteCallbacks(opts *git.AuthOptions) git2go.RemoteCallbacks { +func RemoteCallbacks(opts *git.AuthOptions) git2go.RemoteCallbacks { if opts != nil { return git2go.RemoteCallbacks{ CredentialsCallback: credentialsCallback(opts),