From cc80ca16bb3a333a533c9f77c47616b6d5e48aa1 Mon Sep 17 00:00:00 2001 From: Giraffe1966 <35208168+Giraffe1966@users.noreply.github.com> Date: Sun, 23 Sep 2018 14:43:51 -0400 Subject: [PATCH] Use shallow clone for make_repo and update_repo. --- auto_install/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index f743d05..af7c258 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -537,7 +537,7 @@ make_repo() { # Remove the non-repos interface and clone the interface echo -n "::: Cloning $2 into $1..." $SUDO rm -rf "${1}" - $SUDO git clone -q "${2}" "${1}" > /dev/null & spinner $! + $SUDO git clone -q --depth 1 --no-single-branch "${2}" "${1}" > /dev/null & spinner $! if [ -z "${TESTING+x}" ]; then : else @@ -552,9 +552,9 @@ update_repo() { else # Pull the latest commits echo -n "::: Updating repo in $1..." + $SUDO rm -rf "${1}" + $SUDO git clone -q --depth 1 --no-single-branch "${2}" "${1}" > /dev/null & spinner $! cd "${1}" || exit 1 - $SUDO git stash -q > /dev/null & spinner $! - $SUDO git pull -q > /dev/null & spinner $! if [ -z "${TESTING+x}" ]; then : else