-
Notifications
You must be signed in to change notification settings - Fork 369
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
clone single branch with depth of 1 #836
base: master
Are you sure you want to change the base?
Conversation
cloning only the default branch and with a depth of 1 speeds up the clone time greatly ```sh I0818 19:01:24.786890 27900 git.go:79] Going to run git clone --depth=1 --single-branch -v [email protected]:test/test.git /Users/dbrian/.krew/index/test Cloning into '/Users/dbrian/.krew/index/test'... I0818 19:01:25.342370 27900 fetch_tag.go:47] Parsing response from GitHub ``` ```sh I0818 19:00:39.064036 27722 git.go:79] Going to run git clone -v [email protected]:test/test.git /Users/dbrian/.krew/index/test Cloning into '/Users/dbrian/.krew/index/test'... I0818 19:00:48.527775 27722 root.go:180] Upgrade check was skipped or has not finished ``` Signed-off-by: Brian Davis <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: slimm609 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @slimm609! |
/assign @ahmetb |
/assign @Jaanki |
@slimm609: GitHub didn't allow me to assign the following users: Jaanki. Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I will try to take a look at this sometime but any mistake here can brick Krew installations forever, and our commit history is not particularly bloated so it's not top priority right now. Let me know if there's a particular reason you're pushing for it. |
thanks @ahmetb. With larger private repos for plugins, it can take a very long time to install or update because it downloads the entire history of the repo just to install and all branch references just to install from the main branch. This changes to only download the most recent commit (no history) and only the repo's main branch instead of the main branch plus all additional branches. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Sorry for the delay here. I have a follow up question: doesn't the subsequent "git fetch origin && git reset -hard @{upstream}" command re-download the repository anyway? If that's the case, I don't think this optimization is worth doing (and may end up being worse) for long-term installations that install/update plugins on the same machine over time. |
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
cloning only the default branch and with a depth of 1 speeds up the clone time greatly
Fixes #403