From c0590b19ae944f4017a52bf036490cf8af682a9f Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz Date: Jan 24 2021 18:44:52 +0000 Subject: subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): correctly pass ${_git_branch:-main} to git-clone(1). --- diff --git a/subr.rtl/rtl_fetch.subr b/subr.rtl/rtl_fetch.subr index 6cb49a9..baa1007 100644 --- a/subr.rtl/rtl_fetch.subr +++ b/subr.rtl/rtl_fetch.subr @@ -33,10 +33,10 @@ rtlp_fetch_url_git() { git pull ${_git_args} origin "${_git_branch:-main}") || return 1; (rtl_fileop cd "${_cache_dname}/${_subdir}" &&\ git submodule update) || return 1; - else if git clone ${_git_args} "${_url}" "${_cache_dname}/${_subdir}"; then + else if git clone ${_git_args} -b "${_git_branch:-main}" "${_url}" "${_cache_dname}/${_subdir}"; then _clonefl=1; else for _url_base in ${_mirrors}; do - if git clone ${_git_args} "${_url_base}/${_pkg_name}/${_url##*/}" "${_cache_dname}/${_subdir}"; then + if git clone ${_git_args} -b "${_git_branch:-main}" "${_url_base}/${_pkg_name}/${_url##*/}" "${_cache_dname}/${_subdir}"; then _clonefl=1; break; fi; done;