Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add using alternative branch support for custom indexes
Currently, when user adds a custom index, Krew clones this repository from the default branch statically. Since distributions of most of plugins are managed in these default branches(master, main, etc.), it works without problem. On the other hand, this mechanism does not work for the plugins that using branching strategy per release. For a specific cluster version, plugin maintainers want to force users to use only specific major version(and auto updates of minor versions via Krew). For example, for my cluster v1.2.X, user should use 1.2.X which means that user should add Krew custom index only being encompassed by this branch and I'll continue working on master branch for the next release cycle, v2.0.X. without impacting v1.2.X releases. This PR proposes alternative branching support by appending branch name with `#` symbol. Since we are setting this branch name as default during clone phase, the rest of the functionality will remain same. If user wants to use different branch name for the same git uri, user should remove index first and re-add it with the name branch name.
- Loading branch information