Merge pull request #704 from Giraffe1966/shallow-clone

Use shallow clone for make_repo and update_repo.
This commit is contained in:
james-lasersoft 2019-04-10 00:30:29 -05:00 committed by GitHub
commit 577d662a7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -549,7 +549,7 @@ make_repo() {
# Remove the non-repos interface and clone the interface # Remove the non-repos interface and clone the interface
echo -n "::: Cloning $2 into $1..." echo -n "::: Cloning $2 into $1..."
$SUDO rm -rf "${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 if [ -z "${TESTING+x}" ]; then
: :
else else
@ -564,9 +564,9 @@ update_repo() {
else else
# Pull the latest commits # Pull the latest commits
echo -n "::: Updating repo in $1..." 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 cd "${1}" || exit 1
$SUDO git stash -q > /dev/null & spinner $!
$SUDO git pull -q > /dev/null & spinner $!
if [ -z "${TESTING+x}" ]; then if [ -z "${TESTING+x}" ]; then
: :
else else