mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Merge pull request #704 from Giraffe1966/shallow-clone
Use shallow clone for make_repo and update_repo.
This commit is contained in:
commit
577d662a7c
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue