vendir
vendir copied to clipboard
For faster sync, add option to only download a single branch
Describe the problem/challenge you have
Currently, vendir
takes long time to clone a repository. If I am after files from a specific branch it takes long time and it downloads unnecessary stuff I don't care about.
Describe the solution you'd like
Add an option to
- specify cloning depth
- only clone single branch
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: docs/modules
contents:
- path: ROOT/partials
git:
url: https://github.com/openshift/openshift-docs
ref: rhacs-docs
single-branch: true
depth: 1
includePaths:
- modules/*
newRootPath: modules/
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.
seems like a good suggestion. @gaurav-nelson would you be interested in contributing this change?
Thanks @cppforlife I'm happy to contribute. However, I never tried to code in go
before. If you can point me to the file where the cloning happens I can try it out, but it would be faster for someone who already understands how it all works.
Otherwise I can help test the changes and see if it works as intended and create docs for using this feature.
cloning happens via this package: https://github.com/vmware-tanzu/carvel-vendir/tree/develop/pkg/vendir/fetch/git and configuration for git is here: https://github.com/vmware-tanzu/carvel-vendir/blob/develop/pkg/vendir/config/directory.go#L56. if you are available give it a go!
This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response.