asdf icon indicating copy to clipboard operation
asdf copied to clipboard

feat: plugin-add command can take git branch name.

Open vic opened this issue 2 years ago • 2 comments

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 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.

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 be more 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

vic avatar Apr 15 '22 19:04 vic

👀

jahands avatar May 02 '23 17:05 jahands

What's needed to merge this PR?

aabouzaid avatar Jun 12 '23 18:06 aabouzaid