From c0590b19ae944f4017a52bf036490cf8af682a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Sun, 24 Jan 2021 18:44:52 +0000 Subject: subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): correctly pass ${_git_branch:-main} to git-clone(1). --- subr.rtl/rtl_fetch.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'subr.rtl') diff --git a/subr.rtl/rtl_fetch.subr b/subr.rtl/rtl_fetch.subr index 6cb49a94..baa10073 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; -- cgit v1.2.3