-
Notifications
You must be signed in to change notification settings - Fork 788
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
feat: plugin-add command can take git branch name. #1204
base: master
Are you sure you want to change the base?
Conversation
Previously it was only possible to clone plugin repos on their default branch. This pull-request allows the `plugin-add` command to take an aditional argument for specifying a git-ref used for `git clone`. Note: The `plugin-update` command already was able to take a `git-ref`, but this feature eliminates the need of doing `plugin-add` and immediatly `plugin-update` just for setting the git-ref to use. Sometimes it's convenient to specify another plugin-repo branch or release-tag, instead of using the repos' default branch. For example, if a plugin becomes unstable on its default branch because a bug was introduced, or if the fix is only available at an experimental branch, people might want to try those changes. Also, some advanced plugins, like [asdf-direnv](https://github.com/asdf-community/asdf-direnv) can have tagged releases or `develop` branches that can potentially be more *experimental* but more feature-forward than the `master` branch. Added a test that exercises clonning using an specific branch name. Documented on help.txt and had keep all other commands help aligned. Closes asdf-vm#1201
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please just update and resolve conflicts (I would be am not at a machine right now)
👀 |
What's needed to merge this PR? |
Hi @vic and @jthegedus , I think this is a great feature, however I've already got a working Golang implementation of asdf (PR #1805 and prebuilt binaries are located at https://github.com/asdf-vm/asdf-core-go). It already has support for checking out a specific ref, but it's not yet exposed via the CLI. Do we want to just wait and add this feature to the Go code? |
Summary
Previously it was only possible to clone plugin repos on their default branch.
This pull-request allows the
plugin-add
command to take an aditionalargument for specifying a git-ref used for
git clone
.Note: The
plugin-update
command already was able to take agit-ref
,but this feature eliminates the need of doing
plugin-add
and immediatlyplugin-update
just for setting the git-ref to use.Motivation
Sometimes it's convenient to specify another plugin-repo branch or release-tag,
instead of using the repos' default branch.
For example, if a plugin becomes unstable on its default branch because
a bug was introduced, or if the fix is only available at an experimental
branch, people might want to try those changes.
Also, some advanced plugins, like
asdf-direnv can have
tagged releases or
develop
branches that can potentially bemore experimental but more feature-forward than the
master
branch.Other information
Added a test that exercises clonning using an specific branch name.
Documented on help.txt and had keep all other commands help aligned.
Closes #1201
Closes #166