Skip to content

Commit 5486321

Browse files
authored
Merge pull request #325 from fluxcd/go-git-submodules
Enable git submodules cloning when using go-git
2 parents 3600fe3 + 97d0326 commit 5486321

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/spec/v1beta1/gitrepositories.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ and also impact the traffic costs.
194194
To be able to support Azure DevOps a compromise solution was built, giving the user the
195195
option to select the git library while accepting the drawbacks.
196196

197-
| Git Implementation | Shallow Clones | V2 Protocol Support |
198-
|---|---|---|
199-
| 'go-git' | true | false |
200-
| 'libgit2' | false | true |
197+
| Git Implementation | Shallow Clones | Git Submodules | V2 Protocol Support |
198+
|---|---|---|---|
199+
| 'go-git' | true | true | false |
200+
| 'libgit2' | false | false | true |
201201

202202
Pull the master branch from a repository in Azure DevOps.
203203

@@ -318,7 +318,7 @@ data:
318318
password: <BASE64>
319319
```
320320

321-
## HTTPS self-signed certificates
321+
### HTTPS self-signed certificates
322322

323323
Cloning over HTTPS from a Git repository with a self-signed certificate:
324324

pkg/git/gogit/checkout.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (c *CheckoutBranch) Checkout(ctx context.Context, path, url string, auth *g
6767
SingleBranch: true,
6868
NoCheckout: false,
6969
Depth: 1,
70-
RecurseSubmodules: 0,
70+
RecurseSubmodules: extgogit.DefaultSubmoduleRecursionDepth,
7171
Progress: nil,
7272
Tags: extgogit.NoTags,
7373
CABundle: auth.CABundle,
@@ -99,7 +99,7 @@ func (c *CheckoutTag) Checkout(ctx context.Context, path, url string, auth *git.
9999
SingleBranch: true,
100100
NoCheckout: false,
101101
Depth: 1,
102-
RecurseSubmodules: 0,
102+
RecurseSubmodules: extgogit.DefaultSubmoduleRecursionDepth,
103103
Progress: nil,
104104
Tags: extgogit.NoTags,
105105
CABundle: auth.CABundle,
@@ -131,7 +131,7 @@ func (c *CheckoutCommit) Checkout(ctx context.Context, path, url string, auth *g
131131
ReferenceName: plumbing.NewBranchReferenceName(c.branch),
132132
SingleBranch: true,
133133
NoCheckout: false,
134-
RecurseSubmodules: 0,
134+
RecurseSubmodules: extgogit.DefaultSubmoduleRecursionDepth,
135135
Progress: nil,
136136
Tags: extgogit.NoTags,
137137
CABundle: auth.CABundle,
@@ -173,7 +173,7 @@ func (c *CheckoutSemVer) Checkout(ctx context.Context, path, url string, auth *g
173173
RemoteName: git.DefaultOrigin,
174174
NoCheckout: false,
175175
Depth: 1,
176-
RecurseSubmodules: 0,
176+
RecurseSubmodules: extgogit.DefaultSubmoduleRecursionDepth,
177177
Progress: nil,
178178
Tags: extgogit.AllTags,
179179
CABundle: auth.CABundle,

0 commit comments

Comments
 (0)