From 184f593168bec33b3434e43f80bf285b9bad2e53 Mon Sep 17 00:00:00 2001 From: soloturn Date: Mon, 1 Aug 2022 14:09:22 +0200 Subject: [PATCH] libmakepkg: Fix git clone command Commit e017a5975cfe3e53670848bd45c982524d6745af introduced the GITFLAGS environmental variable. While ensuring the default of "--mirror" was kept, there was a capitalisation mistake made. Handle the default for GITFLAGS directly in the git clone command. --- scripts/libmakepkg/source/git.sh.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/libmakepkg/source/git.sh.in b/scripts/libmakepkg/source/git.sh.in index f809cc9e..9bb337e2 100644 --- a/scripts/libmakepkg/source/git.sh.in +++ b/scripts/libmakepkg/source/git.sh.in @@ -46,12 +46,9 @@ download_git() { url=${url%%#*} url=${url%%\?*} - # Allow overriding of options passed to git clone command, e.g. --filter=blob:none for partial cloning of big repos - local gitflags=${GITFLAGS:---mirror} - if [[ ! -d "$dir" ]] || dir_is_empty "$dir" ; then msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "git" - if ! git clone $GITFLAGS "$url" "$dir"; then + if ! git clone ${GITFLAGS:---mirror} "$url" "$dir"; then error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "git" plainerr "$(gettext "Aborting...")" exit 1