aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoloturn <soloturn@gmail.com>2022-08-01 14:09:22 +0200
committerAllan McRae <allan@archlinux.org>2022-08-02 13:07:09 +1000
commit184f593168bec33b3434e43f80bf285b9bad2e53 (patch)
tree843b60dd0d917a76c6ddbb036620890350259f24
parente017a5975cfe3e53670848bd45c982524d6745af (diff)
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.
-rw-r--r--scripts/libmakepkg/source/git.sh.in5
1 files changed, 1 insertions, 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