carvel-dev / carvel-dev/vendir
Allow use of sparse checkout when vendoring from git
- Dominant language
- Go
- Stars
- 399
- Forks
- 73
- Avg merge
- 2h 53m
- Merged PRs (30d)
- 2
Description
**Describe the problem/challenge you have**
Vendoring from big repositories takes a long time currently. It would be great if that could be improved when using `includePath` and `excludePath`
**Describe the solution you'd like**
When the user declares `includePath` or `excludePath`, and explicitly asks for a sparse checkout, perform a git sparse checkout for them using `includePaths` and `excludePaths` (with globs you'd use no cone mode).
Example new config:
```yaml
apiVersion:
---
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: vendor
contents:
- path: kubernetes
git:
url: https://github.com/yannh/kubernetes-json-schema
ref: master
depth: 1
sparseCheckout: true
includePaths:
- v1.30.5-standalone/**
```
**Anything else you would like to add:**
---
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
Contributor guide
Research direction
The issue names no files or tests. Start at the git vendoring path that handles includePaths and excludePaths, and trace how the sparseCheckout setting should reach checkout. Use the YAML example as the behavior to verify: a non-cone sparse checkout should honor the supplied include and exclude globs while vendoring the repository.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100