mirror of
https://github.com/tmux-plugins/tpm.git
synced 2024-12-04 18:58:49 +00:00
Merge pull request #210 from laggardkernel/bugfix/default-branch
[Bugfix] Remove hardcoding default branch as "master"
This commit is contained in:
commit
38ab7d9ef7
@ -13,9 +13,14 @@ else # shell output functions
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
clone() {
|
clone() {
|
||||||
local plugin="$1"
|
local plugin="$1" branch="$2"
|
||||||
cd "$(tpm_path)" &&
|
if [ -n "$branch" ]; then
|
||||||
GIT_TERMINAL_PROMPT=0 git clone -b "$branch" --single-branch --recursive "$plugin" >/dev/null 2>&1
|
cd "$(tpm_path)" &&
|
||||||
|
GIT_TERMINAL_PROMPT=0 git clone -b "$branch" --single-branch --recursive "$plugin" >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
cd "$(tpm_path)" &&
|
||||||
|
GIT_TERMINAL_PROMPT=0 git clone --single-branch --recursive "$plugin" >/dev/null 2>&1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# tries cloning:
|
# tries cloning:
|
||||||
@ -30,8 +35,7 @@ clone_plugin() {
|
|||||||
|
|
||||||
# clone plugin and produce output
|
# clone plugin and produce output
|
||||||
install_plugin() {
|
install_plugin() {
|
||||||
local plugin="$1"
|
local plugin="$1" branch="$2"
|
||||||
local branch=`[ -z "$2" ] && echo "master" || echo "$2"`
|
|
||||||
local plugin_name="$(plugin_name_helper "$plugin")"
|
local plugin_name="$(plugin_name_helper "$plugin")"
|
||||||
|
|
||||||
if plugin_already_installed "$plugin"; then
|
if plugin_already_installed "$plugin"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user