Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git: mimic --branch and --single-branch git clone flags #1321

Closed
caarlos0 opened this issue Jun 15, 2020 · 0 comments · Fixed by #1322
Closed

git: mimic --branch and --single-branch git clone flags #1321

caarlos0 opened this issue Jun 15, 2020 · 0 comments · Fixed by #1322
Labels
kind/enhancement New feature or request

Comments

@caarlos0
Copy link
Contributor

I was looking into having something similar as git clone --branch foo --single-branch on kaniko.

The main difference is that git's --branch allows for both a branch or a tag, and you don't have to know which one it is beforehand.

I was playing around with some code and found a way to implement it in go-git inspired by git's source code: go-git/go-git#97 (comment)

I'm willing to add this to kaniko, but I'm not sure how the API should look like.

We already have the possibility to add #refs/heads/x or #refs/tags/x to the URL, adding more options will make it too hard to read IMHO. I was thinking maybe extending it via environment variables or extra flags?

e.g.:

--git-branch
--git-single-branch
--git-recurse-submodules

and so on...

any thoughts?

cc/ @tejal29

@caarlos0 caarlos0 mentioned this issue Jun 15, 2020
4 tasks
@tejal29 tejal29 added the kind/enhancement New feature or request label Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants