diff --git a/docs/spec/v1beta1/gitrepositories.md b/docs/spec/v1beta1/gitrepositories.md index fdafb07e..9f3b9375 100644 --- a/docs/spec/v1beta1/gitrepositories.md +++ b/docs/spec/v1beta1/gitrepositories.md @@ -194,10 +194,10 @@ and also impact the traffic costs. To be able to support Azure DevOps a compromise solution was built, giving the user the option to select the git library while accepting the drawbacks. -| Git Implementation | Shallow Clones | V2 Protocol Support | -|---|---|---| -| 'go-git' | true | false | -| 'libgit2' | false | true | +| Git Implementation | Shallow Clones | Git Submodules | V2 Protocol Support | +|---|---|---|---| +| 'go-git' | true | true | false | +| 'libgit2' | false | false | true | Pull the master branch from a repository in Azure DevOps. @@ -318,7 +318,7 @@ data: password: ``` -## HTTPS self-signed certificates +### HTTPS self-signed certificates Cloning over HTTPS from a Git repository with a self-signed certificate: diff --git a/pkg/git/gogit/checkout.go b/pkg/git/gogit/checkout.go index 5529bbed..d76cddc4 100644 --- a/pkg/git/gogit/checkout.go +++ b/pkg/git/gogit/checkout.go @@ -67,7 +67,7 @@ func (c *CheckoutBranch) Checkout(ctx context.Context, path, url string, auth *g SingleBranch: true, NoCheckout: false, Depth: 1, - RecurseSubmodules: 0, + RecurseSubmodules: extgogit.DefaultSubmoduleRecursionDepth, Progress: nil, Tags: extgogit.NoTags, CABundle: auth.CABundle, @@ -99,7 +99,7 @@ func (c *CheckoutTag) Checkout(ctx context.Context, path, url string, auth *git. SingleBranch: true, NoCheckout: false, Depth: 1, - RecurseSubmodules: 0, + RecurseSubmodules: extgogit.DefaultSubmoduleRecursionDepth, Progress: nil, Tags: extgogit.NoTags, CABundle: auth.CABundle, @@ -131,7 +131,7 @@ func (c *CheckoutCommit) Checkout(ctx context.Context, path, url string, auth *g ReferenceName: plumbing.NewBranchReferenceName(c.branch), SingleBranch: true, NoCheckout: false, - RecurseSubmodules: 0, + RecurseSubmodules: extgogit.DefaultSubmoduleRecursionDepth, Progress: nil, Tags: extgogit.NoTags, CABundle: auth.CABundle, @@ -173,7 +173,7 @@ func (c *CheckoutSemVer) Checkout(ctx context.Context, path, url string, auth *g RemoteName: git.DefaultOrigin, NoCheckout: false, Depth: 1, - RecurseSubmodules: 0, + RecurseSubmodules: extgogit.DefaultSubmoduleRecursionDepth, Progress: nil, Tags: extgogit.AllTags, CABundle: auth.CABundle,